mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into aro-sync
# Conflicts: # code/modules/integrated_electronics/subtypes/reagents.dm # code/modules/mob/living/carbon/human/species/station/station.dm # code/modules/organs/organ_external.dm # code/modules/ventcrawl/ventcrawl.dm # html/changelogs/.all_changelog.yml
This commit is contained in:
@@ -132,7 +132,7 @@ obj/var/phoronproof = 0
|
||||
eye_blurry = min(eye_blurry+1.5,50)
|
||||
if (prob(max(0,E.damage - 15) + 1) &&!eye_blind)
|
||||
src << "<span class='danger'>You are blinded!</span>"
|
||||
eye_blind += 20
|
||||
Blind(20)
|
||||
|
||||
/mob/living/carbon/human/proc/pl_head_protected()
|
||||
//Checks if the head is adequately sealed.
|
||||
|
||||
@@ -69,6 +69,11 @@
|
||||
#define COLOR_PALE_RED_GRAY "#CC9090"
|
||||
#define COLOR_PALE_PURPLE_GRAY "#BDA2BA"
|
||||
#define COLOR_PURPLE_GRAY "#A2819E"
|
||||
#define COLOR_RED_LIGHT "#FF3333"
|
||||
#define COLOR_DEEP_SKY_BLUE "#00e1ff"
|
||||
|
||||
|
||||
|
||||
|
||||
// Shuttles.
|
||||
|
||||
|
||||
@@ -148,6 +148,12 @@
|
||||
#define INCAPACITATION_DISABLED (INCAPACITATION_KNOCKDOWN|INCAPACITATION_STUNNED)
|
||||
#define INCAPACITATION_ALL (~INCAPACITATION_NONE)
|
||||
|
||||
#define MODIFIER_STACK_FORBID 1 // Disallows stacking entirely.
|
||||
#define MODIFIER_STACK_EXTEND 2 // Disallows a second instance, but will extend the first instance if possible.
|
||||
#define MODIFIER_STACK_ALLOWED 3 // Multiple instances are allowed.
|
||||
|
||||
#define MODIFIER_GENETIC 0 // Modifiers with this flag will be copied to mobs who get cloned.
|
||||
|
||||
// Bodyparts and organs.
|
||||
#define O_MOUTH "mouth"
|
||||
#define O_EYES "eyes"
|
||||
@@ -200,4 +206,10 @@
|
||||
#define TASTE_SENSITIVE 2 //anything below 7%
|
||||
#define TASTE_NORMAL 1 //anything below 15%
|
||||
#define TASTE_DULL 0.5 //anything below 30%
|
||||
#define TASTE_NUMB 0.1 //anything below 150%
|
||||
#define TASTE_NUMB 0.1 //anything below 150%
|
||||
|
||||
// If they're in an FBP, what braintype.
|
||||
#define FBP_NONE ""
|
||||
#define FBP_CYBORG "Cyborg"
|
||||
#define FBP_POSI "Positronic"
|
||||
#define FBP_DRONE "Drone"
|
||||
15
code/__defines/planets.dm
Normal file
15
code/__defines/planets.dm
Normal file
@@ -0,0 +1,15 @@
|
||||
#define WEATHER_CLEAR "clear"
|
||||
#define WEATHER_OVERCAST "overcast"
|
||||
#define WEATHER_LIGHT_SNOW "light snow"
|
||||
#define WEATHER_SNOW "snow"
|
||||
#define WEATHER_BLIZZARD "blizzard"
|
||||
#define WEATHER_RAIN "rain"
|
||||
#define WEATHER_STORM "storm"
|
||||
#define WEATHER_HAIL "hail"
|
||||
#define WEATHER_WINDY "windy"
|
||||
#define WEATHER_HOT "hot"
|
||||
#define WEATHER_BLOOD_MOON "blood moon" // For admin fun or cult later on.
|
||||
|
||||
#define PLANET_PROCESS_WEATHER 0x1
|
||||
#define PLANET_PROCESS_SUN 0x2
|
||||
#define PLANET_PROCESS_TEMP 0x4
|
||||
@@ -82,6 +82,9 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
playsound(loc, hitsound, 50, 1, -1)
|
||||
|
||||
var/power = force
|
||||
for(var/datum/modifier/M in user.modifiers)
|
||||
if(!isnull(M.outgoing_melee_damage_percent))
|
||||
power *= M.outgoing_melee_damage_percent
|
||||
if(HULK in user.mutations)
|
||||
power *= 2
|
||||
return target.hit_with_weapon(src, user, power, hit_zone)
|
||||
|
||||
@@ -2,16 +2,77 @@ var/datum/controller/process/planet/planet_controller = null
|
||||
|
||||
/datum/controller/process/planet
|
||||
var/list/planets = list()
|
||||
var/list/z_to_planet = list()
|
||||
|
||||
/datum/controller/process/planet/setup()
|
||||
name = "planet"
|
||||
name = "planet controller"
|
||||
planet_controller = src
|
||||
schedule_interval = 600 // every minute
|
||||
schedule_interval = 1 MINUTE
|
||||
|
||||
var/list/planet_datums = typesof(/datum/planet) - /datum/planet
|
||||
for(var/P in planet_datums)
|
||||
var/datum/planet/NP = new P()
|
||||
planets.Add(NP)
|
||||
|
||||
allocateTurfs()
|
||||
|
||||
/datum/controller/process/planet/proc/allocateTurfs()
|
||||
for(var/turf/simulated/OT in outdoor_turfs)
|
||||
for(var/datum/planet/P in planets)
|
||||
if(OT.z in P.expected_z_levels)
|
||||
P.planet_floors += OT
|
||||
break
|
||||
outdoor_turfs.Cut() //Why were you in there INCORRECTLY?
|
||||
|
||||
for(var/turf/unsimulated/wall/planetary/PW in planetary_walls)
|
||||
for(var/datum/planet/P in planets)
|
||||
if(PW.type == P.planetary_wall_type)
|
||||
P.planet_walls += PW
|
||||
break
|
||||
planetary_walls.Cut()
|
||||
|
||||
/datum/controller/process/planet/proc/unallocateTurf(var/turf/T)
|
||||
for(var/planet in planets)
|
||||
var/datum/planet/P = planet
|
||||
if(T.z in P.expected_z_levels)
|
||||
P.planet_floors -= T
|
||||
|
||||
/datum/controller/process/planet/doWork()
|
||||
if(outdoor_turfs.len || planetary_walls.len)
|
||||
allocateTurfs()
|
||||
|
||||
for(var/datum/planet/P in planets)
|
||||
P.process(schedule_interval / 10)
|
||||
P.process(schedule_interval / 10)
|
||||
SCHECK //Your process() really shouldn't take this long...
|
||||
//Weather style needs redrawing
|
||||
if(P.needs_work & PLANET_PROCESS_WEATHER)
|
||||
P.needs_work &= ~PLANET_PROCESS_WEATHER
|
||||
var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state, layer = LIGHTING_LAYER - 1)
|
||||
//Redraw weather icons
|
||||
for(var/T in P.planet_floors)
|
||||
var/turf/simulated/turf = T
|
||||
turf.overlays -= turf.weather_overlay
|
||||
turf.weather_overlay = new_overlay
|
||||
turf.overlays += turf.weather_overlay
|
||||
SCHECK
|
||||
|
||||
//Sun light needs changing
|
||||
if(P.needs_work & PLANET_PROCESS_SUN)
|
||||
P.needs_work &= ~PLANET_PROCESS_SUN
|
||||
//Redraw sun overlay
|
||||
var/new_range = P.sun["range"]
|
||||
var/new_brightness = P.sun["brightness"]
|
||||
var/new_color = P.sun["color"]
|
||||
for(var/T in P.planet_floors)
|
||||
var/turf/simulated/turf = T
|
||||
turf.set_light(new_range, new_brightness, new_color)
|
||||
SCHECK
|
||||
|
||||
//Temperature needs updating
|
||||
if(P.needs_work & PLANET_PROCESS_TEMP)
|
||||
P.needs_work &= ~PLANET_PROCESS_TEMP
|
||||
//Set new temperatures
|
||||
for(var/W in P.planet_walls)
|
||||
var/turf/unsimulated/wall/planetary/wall = W
|
||||
wall.set_temperature(P.weather_holder.temperature)
|
||||
SCHECK
|
||||
|
||||
@@ -157,6 +157,8 @@ var/list/gamemode_cache = list()
|
||||
var/slime_delay = 0
|
||||
var/animal_delay = 0
|
||||
|
||||
var/footstep_volume = 0
|
||||
|
||||
var/admin_legacy_system = 0 //Defines whether the server uses the legacy admin system with admins.txt or the SQL system. Config option in config.txt
|
||||
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
|
||||
@@ -772,6 +774,8 @@ var/list/gamemode_cache = list()
|
||||
if("animal_delay")
|
||||
config.animal_delay = value
|
||||
|
||||
if("footstep_volume")
|
||||
config.footstep_volume = text2num(value)
|
||||
|
||||
if("use_loyalty_implants")
|
||||
config.use_loyalty_implants = 1
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
usr.client.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote","Xenobio"))
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote","Xenobio","Planets"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -98,6 +98,9 @@
|
||||
if("Xenobio")
|
||||
debug_variables(xenobio_controller)
|
||||
feedback_add_details("admin_verb", "DXenobio")
|
||||
if("Planets")
|
||||
debug_variables(planet_controller)
|
||||
feedback_add_details("admin_verb", "DPlanets")
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
return
|
||||
|
||||
|
||||
@@ -184,6 +184,10 @@
|
||||
G.fields["real_rank"] = H.mind.assigned_role
|
||||
G.fields["rank"] = assignment
|
||||
G.fields["age"] = H.age
|
||||
if(H.get_FBP_type())
|
||||
G.fields["brain_type"] = H.get_FBP_type()
|
||||
else
|
||||
G.fields["brain_type"] = "Organic"
|
||||
G.fields["fingerprint"] = md5(H.dna.uni_identity)
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
@@ -201,11 +205,19 @@
|
||||
M.fields["b_type"] = H.b_type
|
||||
M.fields["b_dna"] = H.dna.unique_enzymes
|
||||
M.fields["id_gender"] = gender2text(H.identifying_gender)
|
||||
if(H.get_FBP_type())
|
||||
M.fields["brain_type"] = H.get_FBP_type()
|
||||
else
|
||||
M.fields["brain_type"] = "Organic"
|
||||
if(H.med_record && !jobban_isbanned(H, "Records"))
|
||||
M.fields["notes"] = H.med_record
|
||||
|
||||
//Security Record
|
||||
var/datum/data/record/S = CreateSecurityRecord(H.real_name, id)
|
||||
if(H.get_FBP_type())
|
||||
S.fields["brain_type"] = H.get_FBP_type()
|
||||
else
|
||||
S.fields["brain_type"] = "Organic"
|
||||
if(H.sec_record && !jobban_isbanned(H, "Records"))
|
||||
S.fields["notes"] = H.sec_record
|
||||
|
||||
@@ -218,6 +230,10 @@
|
||||
L.fields["fingerprint"] = md5(H.dna.uni_identity)
|
||||
L.fields["sex"] = gender2text(H.gender)
|
||||
L.fields["id_gender"] = gender2text(H.identifying_gender)
|
||||
if(H.get_FBP_type())
|
||||
L.fields["brain_type"] = H.get_FBP_type()
|
||||
else
|
||||
L.fields["brain_type"] = "Organic"
|
||||
L.fields["b_type"] = H.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.SE // Used in respawning
|
||||
@@ -426,6 +442,7 @@
|
||||
G.fields["real_rank"] = "Unassigned"
|
||||
G.fields["sex"] = "Unknown"
|
||||
G.fields["age"] = "Unknown"
|
||||
G.fields["brain_type"] = "Unknown"
|
||||
G.fields["fingerprint"] = "Unknown"
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
@@ -447,6 +464,7 @@
|
||||
R.name = "Security Record #[id]"
|
||||
R.fields["name"] = name
|
||||
R.fields["id"] = id
|
||||
R.fields["brain_type"] = "Unknown"
|
||||
R.fields["criminal"] = "None"
|
||||
R.fields["mi_crim"] = "None"
|
||||
R.fields["mi_crim_d"] = "No minor crime convictions."
|
||||
@@ -467,6 +485,7 @@
|
||||
M.fields["b_type"] = "AB+"
|
||||
M.fields["b_dna"] = md5(name)
|
||||
M.fields["id_gender"] = "Unknown"
|
||||
M.fields["brain_type"] = "Unknown"
|
||||
M.fields["mi_dis"] = "None"
|
||||
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
|
||||
M.fields["ma_dis"] = "None"
|
||||
|
||||
@@ -100,6 +100,11 @@
|
||||
item_cost = 40
|
||||
path = /obj/item/weapon/gun/energy/ionrifle
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/ionpistol
|
||||
name = "Ion Pistol"
|
||||
item_cost = 25
|
||||
path = /obj/item/weapon/gun/energy/ionrifle/pistol
|
||||
|
||||
/datum/uplink_item/item/visible_weapons/xray
|
||||
name = "Xray Gun"
|
||||
item_cost = 85
|
||||
|
||||
@@ -216,7 +216,6 @@
|
||||
/obj/machinery/computer/scan_consolenew
|
||||
name = "DNA Modifier Access Console"
|
||||
desc = "Scan DNA."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "med_key"
|
||||
icon_screen = "dna"
|
||||
density = 1
|
||||
|
||||
@@ -13,6 +13,8 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
var/isabsorbing = 0
|
||||
var/geneticpoints = 5
|
||||
var/max_geneticpoints = 5
|
||||
var/readapts = 1
|
||||
var/max_readapts = 2
|
||||
var/list/purchased_powers = list()
|
||||
var/mimicing = ""
|
||||
var/cloaked = 0
|
||||
@@ -60,6 +62,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
|
||||
if(!mind.changeling) mind.changeling = new /datum/changeling(gender)
|
||||
|
||||
verbs += /datum/changeling/proc/EvolutionMenu
|
||||
verbs += /mob/proc/changeling_respec
|
||||
add_language("Changeling")
|
||||
|
||||
var/lesser_form = !ishuman(src)
|
||||
|
||||
@@ -72,7 +72,12 @@
|
||||
if(src.nutrition < 400)
|
||||
src.nutrition = min((src.nutrition + T.nutrition), 400)
|
||||
changeling.chem_charges += 10
|
||||
src.verbs += /mob/proc/changeling_respec
|
||||
if(changeling.readapts <= 0)
|
||||
changeling.readapts = 0 //SANITYYYYYY
|
||||
changeling.readapts++
|
||||
if(changeling.readapts > changeling.max_readapts)
|
||||
changeling.readapts = changeling.max_readapts
|
||||
|
||||
src << "<span class='notice'>We can now re-adapt, reverting our evolution so that we may start anew, if needed.</span>"
|
||||
|
||||
var/datum/absorbed_dna/newDNA = new(T.real_name, T.dna, T.species.name, T.languages, T.identifying_gender, T.flavor_texts)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
if(held_item == null)
|
||||
if(src.mind.changeling.recursive_enhancement)
|
||||
if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent))
|
||||
if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent,0))
|
||||
src << "<span class='notice'>We will shock others more efficently.</span>"
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
src << "<span class='notice'>They will be deprived of sight for longer.</span>"
|
||||
spawn(duration)
|
||||
T.disabilities &= ~NEARSIGHTED
|
||||
T.eye_blind = 10
|
||||
T.Blind(10)
|
||||
T.eye_blurry = 20
|
||||
feedback_add_details("changeling_powers","BS")
|
||||
return 1
|
||||
@@ -2,12 +2,24 @@
|
||||
name = "Delayed Toxic Sting"
|
||||
desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not \
|
||||
implicate ourselves."
|
||||
helptext = "The toxin takes effect in about two minutes. The sting has a three minute cooldown between uses."
|
||||
helptext = "The toxin takes effect in about two minutes. Multiple applications within the two minutes will not cause increased toxicity."
|
||||
enhancedtext = "The toxic damage is doubled."
|
||||
ability_icon_state = "ling_sting_del_toxin"
|
||||
genomecost = 1
|
||||
verbpath = /mob/proc/changeling_delayed_toxic_sting
|
||||
|
||||
/datum/modifier/delayed_toxin_sting
|
||||
name = "delayed toxin injection"
|
||||
hidden = TRUE
|
||||
stacks = MODIFIER_STACK_FORBID
|
||||
on_expired_text = "<span class='danger'>You feel a burning sensation flowing through your veins!</span>"
|
||||
|
||||
/datum/modifier/delayed_toxin_sting/on_expire()
|
||||
holder.adjustToxLoss(rand(20, 30))
|
||||
|
||||
/datum/modifier/delayed_toxin_sting/strong/on_expire()
|
||||
holder.adjustToxLoss(rand(40, 60))
|
||||
|
||||
/mob/proc/changeling_delayed_toxic_sting()
|
||||
set category = "Changeling"
|
||||
set name = "Delayed Toxic Sting (20)"
|
||||
@@ -19,21 +31,13 @@
|
||||
T.attack_log += text("\[[time_stamp()]\] <font color='red'>Was delayed toxic stung by [key_name(src)]</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'> Used delayed toxic sting on [key_name(T)]</font>")
|
||||
msg_admin_attack("[key_name(T)] was delayed toxic stung by [key_name(src)]")
|
||||
var/i = rand(20,30)
|
||||
|
||||
var/type_to_give = /datum/modifier/delayed_toxin_sting
|
||||
if(src.mind.changeling.recursive_enhancement)
|
||||
i = i * 2
|
||||
type_to_give = /datum/modifier/delayed_toxin_sting/strong
|
||||
src << "<span class='notice'>Our toxin will be extra potent, when it strikes.</span>"
|
||||
spawn(2 MINUTES)
|
||||
if(T) //We might not exist in two minutes, for whatever reason.
|
||||
T << "<span class='danger'>You feel a burning sensation flowing through your veins!</span>"
|
||||
while(i)
|
||||
T.adjustToxLoss(1)
|
||||
i--
|
||||
sleep(2 SECONDS)
|
||||
src.verbs -= /mob/proc/changeling_delayed_toxic_sting
|
||||
spawn(3 MINUTES)
|
||||
src << "<span class='notice'>We are ready to use our delayed toxic string once more.</span>"
|
||||
src.verbs |= /mob/proc/changeling_delayed_toxic_sting
|
||||
|
||||
T.add_modifier(type_to_give, 2 MINUTES)
|
||||
|
||||
|
||||
feedback_add_details("changeling_powers","DTS")
|
||||
|
||||
@@ -6,9 +6,18 @@
|
||||
isVerb = 0
|
||||
verbpath = /mob/proc/changeling_endoarmor
|
||||
|
||||
/datum/modifier/endoarmor
|
||||
name = "endoarmor"
|
||||
desc = "We have hard plating underneath our skin, making us more durable."
|
||||
|
||||
on_created_text = "<span class='notice'>We feel protective plating form underneath our skin.</span>"
|
||||
on_expired_text = "<span class='notice'>Our protective armor underneath our skin fades as we absorb it.</span>"
|
||||
max_health_flat = 50
|
||||
|
||||
//Increases macimum chemical storage
|
||||
/mob/proc/changeling_endoarmor()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.maxHealth += 50
|
||||
H.add_modifier(/datum/modifier/endoarmor)
|
||||
// H.maxHealth += 50
|
||||
return 1
|
||||
@@ -1,13 +1,29 @@
|
||||
/datum/power/changeling/enfeebling_string
|
||||
name = "Enfeebling String"
|
||||
desc = "We sting a biological with a potent toxin that will greatly weaken them for a short period of time."
|
||||
helptext = "Lowers the maximum health of the victim for a few minutes. This sting will also warn them of this. Has a \
|
||||
five minute coodown between uses."
|
||||
enhancedtext = "Maximum health is lowered further."
|
||||
helptext = "Lowers the maximum health of the victim for a few minutes, as well as making them more frail and weak. This sting will also warn them of this."
|
||||
enhancedtext = "Maximum health and outgoing melee damage is lowered further. Incoming damage is increased."
|
||||
ability_icon_state = "ling_sting_enfeeble"
|
||||
genomecost = 1
|
||||
verbpath = /mob/proc/changeling_enfeebling_string
|
||||
|
||||
/datum/modifier/enfeeble
|
||||
name = "enfeebled"
|
||||
desc = "You feel really weak and frail for some reason."
|
||||
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
max_health_percent = 0.7
|
||||
outgoing_melee_damage_percent = 0.75
|
||||
incoming_damage_percent = 1.1
|
||||
on_created_text = "<span class='danger'>You feel a small prick and you feel extremly weak!</span>"
|
||||
on_expired_text = "<span class='notice'>You no longer feel extremly weak.</span>"
|
||||
|
||||
// Now YOU'RE the Teshari!
|
||||
/datum/modifier/enfeeble/strong
|
||||
max_health_percent = 0.5
|
||||
outgoing_melee_damage_percent = 0.5
|
||||
incoming_damage_percent = 1.35
|
||||
|
||||
/mob/proc/changeling_enfeebling_string()
|
||||
set category = "Changeling"
|
||||
set name = "Enfeebling Sting (30)"
|
||||
@@ -23,22 +39,10 @@
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'> Used enfeebling sting on [key_name(T)]</font>")
|
||||
msg_admin_attack("[key_name(T)] was enfeebling stung by [key_name(src)]")
|
||||
|
||||
|
||||
var/effect = 30 //percent
|
||||
var/type_to_give = /datum/modifier/enfeeble
|
||||
if(src.mind.changeling.recursive_enhancement)
|
||||
effect = effect + 20
|
||||
type_to_give = /datum/modifier/enfeeble/strong
|
||||
src << "<span class='notice'>We make them extremely weak.</span>"
|
||||
var/health_to_take_away = H.maxHealth * (effect / 100)
|
||||
|
||||
H.maxHealth -= health_to_take_away
|
||||
H << "<span class='danger'>You feel a small prick and you feel extremly weak!</span>"
|
||||
src.verbs -= /mob/proc/changeling_enfeebling_string
|
||||
spawn(5 MINUTES)
|
||||
src.verbs |= /mob/proc/changeling_enfeebling_string
|
||||
src << "<span class='notice'>Our enfeebling string is ready to be used once more.</span>"
|
||||
if(H) //Just incase we stop existing in five minutes for whatever reason.
|
||||
H.maxHealth += health_to_take_away
|
||||
if(!H.stat) //It'd be weird to no longer feel weak when you're dead.
|
||||
H << "<span class='notice'>You no longer feel extremly weak.</span>"
|
||||
H.add_modifier(type_to_give, 2 MINUTES)
|
||||
feedback_add_details("changeling_powers","ES")
|
||||
return 1
|
||||
@@ -2,11 +2,20 @@
|
||||
name = "Epinephrine Overdose"
|
||||
desc = "We evolve additional sacs of adrenaline throughout our body."
|
||||
helptext = "We can instantly recover from stuns and reduce the effect of future stuns, but we will suffer toxicity in the long term. Can be used while unconscious."
|
||||
enhancedtext = "Constant recovery from stuns for thirty seconds."
|
||||
enhancedtext = "Immunity from most disabling effects for 30 seconds."
|
||||
ability_icon_state = "ling_epinepherine_overdose"
|
||||
genomecost = 2
|
||||
verbpath = /mob/proc/changeling_epinephrine_overdose
|
||||
|
||||
/datum/modifier/unstoppable
|
||||
name = "unstoppable"
|
||||
desc = "We feel limitless amounts of energy surge in our veins. Nothing can stop us!"
|
||||
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
on_created_text = "<span class='notice'>We feel unstoppable!</span>"
|
||||
on_expired_text = "<span class='warning'>We feel our newfound energy fade...</span>"
|
||||
disable_duration_percent = 0
|
||||
|
||||
//Recover from stuns.
|
||||
/mob/proc/changeling_epinephrine_overdose()
|
||||
set category = "Changeling"
|
||||
@@ -30,18 +39,7 @@
|
||||
C.reagents.add_reagent("epinephrine", 20)
|
||||
|
||||
if(src.mind.changeling.recursive_enhancement)
|
||||
src << "<span class='notice'>We feel unstoppable.</span>"
|
||||
spawn(1)
|
||||
var/i = 30
|
||||
while(i)
|
||||
C.SetParalysis(0)
|
||||
C.SetStunned(0)
|
||||
C.SetWeakened(0)
|
||||
C.lying = 0
|
||||
C.update_canmove()
|
||||
i--
|
||||
sleep(10)
|
||||
src << "<span class='notice'>We feel our newfound energy fade.</span>"
|
||||
C.add_modifier(/datum/modifier/unstoppable, 30 SECONDS)
|
||||
|
||||
feedback_add_details("changeling_powers","UNS")
|
||||
return 1
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
C.species.create_organs(C)
|
||||
C.restore_all_organs()
|
||||
C.blinded = 0
|
||||
C.eye_blind = 0
|
||||
C.SetBlinded(0)
|
||||
C.eye_blurry = 0
|
||||
C.ear_deaf = 0
|
||||
C.ear_damage = 0
|
||||
|
||||
@@ -6,9 +6,14 @@
|
||||
var/datum/changeling/changeling = changeling_power(0,0,100)
|
||||
if(!changeling)
|
||||
return
|
||||
if(src.mind.changeling.readapts <= 0)
|
||||
to_chat(src, "<span class='warning'>We must first absorb another compatable creature!</span>")
|
||||
src.mind.changeling.readapts = 0
|
||||
return
|
||||
|
||||
src.remove_changeling_powers() //First, remove the verbs.
|
||||
var/datum/changeling/ling_datum = src.mind.changeling
|
||||
ling_datum.readapts--
|
||||
ling_datum.purchased_powers = list() //Then wipe all the powers we bought.
|
||||
ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum.
|
||||
ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
|
||||
@@ -17,8 +22,8 @@
|
||||
ling_datum.chem_storage = 50
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.does_not_breathe = 0 //If self respiration was bought, revert that too.
|
||||
H.maxHealth = initial(H.maxHealth) //Revert endoarmor too.
|
||||
// H.does_not_breathe = 0 //If self respiration was bought, revert that too.
|
||||
H.remove_modifiers_of_type(/datum/modifier/endoarmor) //Revert endoarmor too.
|
||||
src.make_changeling() //And give back our freebies.
|
||||
|
||||
src << "<span class='notice'>We have removed our evolutions from this form, and are now ready to readapt.</span>"
|
||||
@@ -26,4 +31,4 @@
|
||||
ling_datum.purchased_powers_history.Add("Re-adapt (Reset to [ling_datum.max_geneticpoints])")
|
||||
|
||||
//Now to lose the verb, so no unlimited resets.
|
||||
src.verbs -= /mob/proc/changeling_respec
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
M << "<span class='danger'>You hear an extremely loud screeching sound! It \
|
||||
[pick("confuses","confounds","perturbs","befuddles","dazes","unsettles","disorients")] you.</span>"
|
||||
M.adjustEarDamage(0,30)
|
||||
M.confused += 20
|
||||
M.Confuse(20)
|
||||
M << sound('sound/effects/screech.ogg')
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Was affected by [key_name(src)]'s Resonant Shriek.</font>")
|
||||
else
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
desc = "A hood worn by the followers of Nar-Sie."
|
||||
flags_inv = HIDEFACE
|
||||
body_parts_covered = HEAD
|
||||
armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0)
|
||||
armor = list(melee = 50, bullet = 30, laser = 50, energy = 80, bomb = 25, bio = 10, rad = 0)
|
||||
cold_protection = HEAD
|
||||
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0
|
||||
@@ -73,7 +73,7 @@
|
||||
icon_state = "cultrobes"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade)
|
||||
armor = list(melee = 50, bullet = 30, laser = 50, energy = 20, bomb = 25, bio = 10, rad = 0)
|
||||
armor = list(melee = 50, bullet = 30, laser = 50, energy = 80, bomb = 25, bio = 10, rad = 0)
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
siemens_coefficient = 0
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
name = "cult helmet"
|
||||
desc = "A space worthy helmet used by the followers of Nar-Sie."
|
||||
icon_state = "cult_helmet"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 80, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/space/cult/cultify()
|
||||
@@ -108,7 +108,7 @@
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank/emergency/oxygen,/obj/item/device/suit_cooling_unit)
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 80, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0
|
||||
flags_inv = HIDEGLOVES|HIDEJUMPSUIT|HIDETAIL|HIDETIE|HIDEHOLSTER
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS
|
||||
|
||||
@@ -958,7 +958,7 @@ var/list/sacrificed = list()
|
||||
if(N)
|
||||
continue
|
||||
C.eye_blurry += 50
|
||||
C.eye_blind += 20
|
||||
C.Blind(20)
|
||||
if(prob(5))
|
||||
C.disabilities |= NEARSIGHTED
|
||||
if(prob(10))
|
||||
@@ -981,7 +981,7 @@ var/list/sacrificed = list()
|
||||
if(N)
|
||||
continue
|
||||
C.eye_blurry += 30
|
||||
C.eye_blind += 10
|
||||
C.Blind(10)
|
||||
//talismans is weaker.
|
||||
affected += C
|
||||
C.show_message("<span class='warning'>You feel a sharp pain in your eyes, and the world disappears into darkness..</span>", 3)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(is_ally(L))
|
||||
continue
|
||||
|
||||
var/damage_to_inflict = max(L.health / L.maxHealth, 0) // Otherwise, those in crit would actually be healed.
|
||||
var/damage_to_inflict = max(L.health / L.getMaxHealth(), 0) // Otherwise, those in crit would actually be healed.
|
||||
|
||||
var/armor_factor = abs(L.getarmor(null, "energy") - 100)
|
||||
armor_factor = armor_factor / 100
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
warned_victim = predict_crit(pulses, H, 0)
|
||||
sleep(4 SECONDS)
|
||||
H.adjustOxyLoss(5)
|
||||
var/health_lost = H.maxHealth - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
|
||||
var/health_lost = H.getMaxHealth() - H.getOxyLoss() + H.getToxLoss() + H.getFireLoss() + H.getBruteLoss() + H.getCloneLoss()
|
||||
H.adjustOxyLoss(round(abs(health_lost * 0.25)))
|
||||
//world << "Inflicted [round(abs(health_lost * 0.25))] damage!"
|
||||
pulses--
|
||||
@@ -62,7 +62,7 @@
|
||||
pulses_remaining--
|
||||
return .(pulses_remaining, victim, previous_damage)
|
||||
// Now check if our damage predictions are going to cause the victim to go into crit if no healing occurs.
|
||||
if(previous_damage + health_lost >= victim.maxHealth) // We're probably going to hardcrit
|
||||
if(previous_damage + health_lost >= victim.getMaxHealth()) // We're probably going to hardcrit
|
||||
victim << "<span class='danger'><font size='3'>A feeling of immense dread starts to overcome you as everything starts \
|
||||
to fade to black...</font></span>"
|
||||
//world << "Predicted hardcrit."
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
user << "<span class='notice'>You stab \the [L] with a hidden integrated hypo, attempting to bring them back...</span>"
|
||||
if(istype(L, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SM = L
|
||||
SM.health = SM.maxHealth / 3
|
||||
SM.health = SM.getMaxHealth() / 3
|
||||
SM.stat = CONSCIOUS
|
||||
dead_mob_list -= SM
|
||||
living_mob_list += SM
|
||||
|
||||
@@ -62,4 +62,4 @@
|
||||
|
||||
|
||||
// Now we hurt their new pal, because being forcefully abducted by teleportation can't be healthy.
|
||||
summoned.health = round(summoned.maxHealth * 0.7)
|
||||
summoned.health = round(summoned.getMaxHealth() * 0.7)
|
||||
@@ -27,11 +27,13 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
|
||||
if(has_alt_title(H, alt_title,"Bartender"))
|
||||
var/obj/item/weapon/permit/gun/bar/permit = new(H)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/permit/gun/bar(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(permit, slot_l_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/permit/gun/bar(H.back), slot_in_backpack)
|
||||
return 1
|
||||
H.equip_to_slot_or_del(permit, slot_in_backpack)
|
||||
permit.set_name(H.real_name)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -388,6 +388,7 @@ var/global/datum/controller/occupations/job_master
|
||||
job.equip_backpack(H)
|
||||
job.equip_survival(H)
|
||||
job.apply_fingerprints(H)
|
||||
H.equip_post_job()
|
||||
|
||||
//If some custom items could not be equipped before, try again now.
|
||||
for(var/thing in custom_equip_leftovers)
|
||||
|
||||
@@ -72,7 +72,6 @@ obj/machinery/air_sensor/Destroy()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/general_air_control
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "atmos_key"
|
||||
icon_screen = "tank"
|
||||
name = "Computer"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/machinery/computer/aifixer
|
||||
name = "\improper AI system integrity restorer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "rd_key"
|
||||
icon_screen = "ai-fixer"
|
||||
light_color = "#a97faa"
|
||||
@@ -102,7 +101,7 @@
|
||||
return 1
|
||||
if (href_list["fix"])
|
||||
src.active = 1
|
||||
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-on")
|
||||
src.overlays += image(icon, "ai-fixer-on")
|
||||
while (src.occupant.health < 100)
|
||||
src.occupant.adjustOxyLoss(-1)
|
||||
src.occupant.adjustFireLoss(-1)
|
||||
@@ -114,13 +113,13 @@
|
||||
src.occupant.lying = 0
|
||||
dead_mob_list -= src.occupant
|
||||
living_mob_list += src.occupant
|
||||
src.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
src.overlays -= image(icon, "ai-fixer-404")
|
||||
src.overlays += image(icon, "ai-fixer-full")
|
||||
src.occupant.add_ai_verbs()
|
||||
src.updateUsrDialog()
|
||||
sleep(10)
|
||||
src.active = 0
|
||||
src.overlays -= image('icons/obj/computer.dmi', "ai-fixer-on")
|
||||
src.overlays -= image(icon, "ai-fixer-on")
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
@@ -135,8 +134,8 @@
|
||||
|
||||
if(occupant)
|
||||
if(occupant.stat)
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-404", overlay_layer)
|
||||
overlays += image(icon, "ai-fixer-404", overlay_layer)
|
||||
else
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-full", overlay_layer)
|
||||
overlays += image(icon, "ai-fixer-full", overlay_layer)
|
||||
else
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty", overlay_layer)
|
||||
overlays += image(icon, "ai-fixer-empty", overlay_layer)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
/obj/machinery/computer/atmoscontrol
|
||||
name = "\improper Central Atmospherics Computer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "generic_key"
|
||||
icon_screen = "comm_logs"
|
||||
light_color = "#00b000"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/machinery/computer/cloning
|
||||
name = "cloning control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "med_key"
|
||||
icon_screen = "dna"
|
||||
light_color = "#315ab4"
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
|
||||
dat += "<table><tr><td>Name: [active1.fields["name"]] \
|
||||
ID: [active1.fields["id"]]<BR>\n \
|
||||
Entity Classification: <A href='?src=\ref[src];field=brain_type'>[active1.fields["brain_type"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n"
|
||||
if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
|
||||
dat += "Gender identity: <A href='?src=\ref[src];field=id_gender'>[active2.fields["id_gender"]]</A><BR>"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/obj/machinery/computer/prisoner
|
||||
name = "prisoner management console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "security_key"
|
||||
icon_screen = "explosive"
|
||||
light_color = "#a91515"
|
||||
|
||||
@@ -12,7 +12,6 @@ var/prison_shuttle_timeleft = 0
|
||||
|
||||
/obj/machinery/computer/prison_shuttle
|
||||
name = "prison shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "security_key"
|
||||
icon_screen = "syndishuttle"
|
||||
light_color = "#00ffff"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/machinery/computer/robotics
|
||||
name = "robotics control console"
|
||||
desc = "Used to remotely lockdown or detonate linked cyborgs."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "tech_key"
|
||||
icon_screen = "robot"
|
||||
light_color = "#a97faa"
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
dat += text("<table><tr><td> \
|
||||
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
|
||||
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
|
||||
Entity Classification: <A href='?src=\ref[src];field=brain_type'>[active1.fields["brain_type"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
||||
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
|
||||
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
|
||||
@@ -612,5 +613,4 @@ What a mess.*/
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/computer/secure_data/detective_computer
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "messyfiles"
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
dat += text("<table><tr><td> \
|
||||
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
|
||||
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
|
||||
Entity Classification: <A href='?src=\ref[src];field=brain_type'>[active1.fields["brain_type"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
||||
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
|
||||
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
|
||||
|
||||
@@ -13,7 +13,6 @@ var/specops_shuttle_timeleft = 0
|
||||
|
||||
/obj/machinery/computer/specops_shuttle
|
||||
name = "special operations shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "security_key"
|
||||
icon_screen = "syndishuttle"
|
||||
light_color = "#00ffff"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/machinery/computer/supplycomp
|
||||
name = "supply control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "tech_key"
|
||||
icon_screen = "supply"
|
||||
light_color = "#b88b2e"
|
||||
@@ -13,7 +12,6 @@
|
||||
|
||||
/obj/machinery/computer/ordercomp
|
||||
name = "supply ordering console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "request"
|
||||
circuit = /obj/item/weapon/circuitboard/ordercomp
|
||||
var/temp = null
|
||||
|
||||
@@ -12,7 +12,6 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
|
||||
/obj/machinery/computer/syndicate_elite_shuttle
|
||||
name = "elite syndicate squad shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "syndie_key"
|
||||
icon_screen = "syndishuttle"
|
||||
light_color = "#00ffff"
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
|
||||
dat += "<table><tr><td>Name: [active1.fields["name"]] \
|
||||
ID: [active1.fields["id"]]<BR>\n \
|
||||
Entity Classification: <A href='?src=\ref[src];field=brain_type'>[active1.fields["brain_type"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
||||
Age: <A href='?src=\ref[src];field=age'>[active1.fields["age"]]</A><BR>\n \
|
||||
Fingerprint: <A href='?src=\ref[src];field=fingerprint'>[active1.fields["fingerprint"]]</A><BR>\n \
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
dat += text("<table><tr><td> \
|
||||
Name: <A href='?src=\ref[src];choice=Edit Field;field=name'>[active1.fields["name"]]</A><BR> \
|
||||
ID: <A href='?src=\ref[src];choice=Edit Field;field=id'>[active1.fields["id"]]</A><BR>\n \
|
||||
Entity Classification: <A href='?src=\ref[src];field=brain_type'>[active1.fields["brain_type"]]</A><BR>\n \
|
||||
Sex: <A href='?src=\ref[src];choice=Edit Field;field=sex'>[active1.fields["sex"]]</A><BR>\n \
|
||||
Age: <A href='?src=\ref[src];choice=Edit Field;field=age'>[active1.fields["age"]]</A><BR>\n \
|
||||
Rank: <A href='?src=\ref[src];choice=Edit Field;field=rank'>[active1.fields["rank"]]</A><BR>\n \
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
occupantData["name"] = occupant.name
|
||||
occupantData["stat"] = occupant.stat
|
||||
occupantData["health"] = occupant.health
|
||||
occupantData["maxHealth"] = occupant.maxHealth
|
||||
occupantData["maxHealth"] = occupant.getMaxHealth()
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["bruteLoss"] = occupant.getBruteLoss()
|
||||
occupantData["oxyLoss"] = occupant.getOxyLoss()
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
desc = "That looks like it doesn't open easily."
|
||||
icon = 'icons/obj/doors/rapid_pdoor.dmi'
|
||||
icon_state = null
|
||||
min_force = 20 //minimum amount of force needed to damage the door with a melee weapon
|
||||
|
||||
// Icon states for different shutter types. Simply change this instead of rewriting the update_icon proc.
|
||||
var/icon_state_open = null
|
||||
@@ -78,7 +79,10 @@
|
||||
// Proc: force_toggle()
|
||||
// Parameters: None
|
||||
// Description: Opens or closes the door, depending on current state. No checks are done inside this proc.
|
||||
/obj/machinery/door/blast/proc/force_toggle()
|
||||
/obj/machinery/door/blast/proc/force_toggle(var/forced = 0, mob/user as mob)
|
||||
if (forced)
|
||||
playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
|
||||
|
||||
if(src.density)
|
||||
src.force_open()
|
||||
else
|
||||
@@ -91,7 +95,7 @@
|
||||
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(istype(C, /obj/item/weapon)) // For reasons unknown, sometimes C is actually not what it is advertised as, like a mob.
|
||||
if(C.pry == 1) // Can we pry it open with something, like a crowbar/fireaxe/lingblade?
|
||||
if(C.pry == 1 && (user.a_intent != I_HURT || (stat & BROKEN))) // Can we pry it open with something, like a crowbar/fireaxe/lingblade?
|
||||
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe)) // Fireaxes need to be in both hands to pry.
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
@@ -100,7 +104,8 @@
|
||||
|
||||
// If we're at this point, it's a fireaxe in both hands or something else that doesn't care for twohanding.
|
||||
if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
|
||||
force_toggle()
|
||||
force_toggle(1, user)
|
||||
|
||||
else
|
||||
usr << "<span class='notice'>[src]'s motors resist your effort.</span>"
|
||||
return
|
||||
@@ -123,15 +128,33 @@
|
||||
usr << "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>"
|
||||
|
||||
|
||||
else if(src.density)
|
||||
var/obj/item/weapon/W = C
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
if(W.force < min_force)
|
||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
|
||||
playsound(src.loc, hitsound, 100, 1)
|
||||
take_damage(W.force*0.35) //it's a blast door, it should take a while. -Luke
|
||||
return
|
||||
|
||||
|
||||
// Proc: open()
|
||||
// Parameters: None
|
||||
// Description: Opens the door. Does necessary checks. Automatically closes if autoclose is true
|
||||
/obj/machinery/door/blast/open()
|
||||
if (src.operating || (stat & BROKEN || stat & NOPOWER))
|
||||
return
|
||||
force_open()
|
||||
if(autoclose)
|
||||
/obj/machinery/door/blast/open(var/forced = 0)
|
||||
if(forced)
|
||||
force_open()
|
||||
return 1
|
||||
else
|
||||
if (src.operating || (stat & BROKEN || stat & NOPOWER))
|
||||
return 1
|
||||
force_open()
|
||||
|
||||
if(autoclose && src.operating && !(stat & BROKEN || stat & NOPOWER))
|
||||
spawn(150)
|
||||
close()
|
||||
return 1
|
||||
|
||||
@@ -314,6 +314,8 @@
|
||||
|
||||
/obj/machinery/door/examine(mob/user)
|
||||
. = ..()
|
||||
if(src.health <= 0)
|
||||
user << "\The [src] is broken!"
|
||||
if(src.health < src.maxhealth / 4)
|
||||
user << "\The [src] looks like it's about to break!"
|
||||
else if(src.health < src.maxhealth / 2)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
C.traits = new()
|
||||
C.nameVar = "grey"
|
||||
I.add_product(C)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/smartfridge/secure/medbay
|
||||
name = "\improper Refrigerated Medicine Storage"
|
||||
@@ -139,6 +139,7 @@
|
||||
icon_state = "drying_rack"
|
||||
icon_on = "drying_rack_on"
|
||||
icon_off = "drying_rack"
|
||||
icon_panel = "drying_rack-panel"
|
||||
|
||||
/obj/machinery/smartfridge/drying_rack/accept_check(var/obj/item/O as obj)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/))
|
||||
@@ -260,7 +261,7 @@
|
||||
locked = -1
|
||||
user << "You short out the product lock on [src]."
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/smartfridge/proc/stock(obj/item/O)
|
||||
var/hasRecord = FALSE //Check to see if this passes or not.
|
||||
for(var/datum/stored_item/I in item_records)
|
||||
@@ -273,7 +274,7 @@
|
||||
item.add_product(O)
|
||||
item_records.Add(item)
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
|
||||
/obj/machinery/smartfridge/proc/vend(datum/stored_item/I)
|
||||
I.get_product(get_turf(src))
|
||||
nanomanager.update_uis(src)
|
||||
@@ -357,7 +358,7 @@
|
||||
if (!throw_item)
|
||||
continue
|
||||
break
|
||||
|
||||
|
||||
if(!throw_item)
|
||||
return 0
|
||||
spawn(0)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/obj/machinery/computer/mecha
|
||||
name = "Exosuit Control"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_keyboard = "rd_key"
|
||||
icon_screen = "mecha"
|
||||
light_color = "#a97faa"
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
holder.icon_state = "hudhealth-100"
|
||||
C.images += holder
|
||||
else
|
||||
holder.icon_state = RoundHealth((patient.health-config.health_threshold_crit)/(patient.maxHealth-config.health_threshold_crit)*100)
|
||||
holder.icon_state = RoundHealth((patient.health-config.health_threshold_crit)/(patient.getMaxHealth()-config.health_threshold_crit)*100)
|
||||
C.images += holder
|
||||
|
||||
holder = patient.hud_list[STATUS_HUD]
|
||||
|
||||
@@ -74,7 +74,12 @@
|
||||
add_fingerprint(user)
|
||||
unbuckle_mob()
|
||||
|
||||
if(buckle_mob(M))
|
||||
//can't buckle unless you share locs so try to move M to the obj.
|
||||
if(M.loc != src.loc)
|
||||
step_towards(M, src)
|
||||
|
||||
. = buckle_mob(M)
|
||||
if(.)
|
||||
if(M == user)
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
|
||||
|
||||
@@ -86,6 +86,12 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/body_bag/relaymove(mob/user,direction)
|
||||
if(src.loc != get_turf(src))
|
||||
src.loc.relaymove(user,direction)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/body_bag/proc/get_occupants()
|
||||
var/list/occupants = list()
|
||||
for(var/mob/living/carbon/human/H in contents)
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
flash_strength *= H.species.flash_mod
|
||||
|
||||
if(flash_strength > 0)
|
||||
H.confused = max(H.confused, flash_strength + 5)
|
||||
H.eye_blind = max(H.eye_blind, flash_strength)
|
||||
H.Confuse(flash_strength + 5)
|
||||
H.Blind(flash_strength)
|
||||
H.eye_blurry = max(H.eye_blurry, flash_strength + 5)
|
||||
H.flash_eyes()
|
||||
H.adjustHalLoss(halloss_per_flash * (flash_strength / 5)) // Should take four flashes to stun.
|
||||
|
||||
@@ -65,10 +65,12 @@ var/global/list/default_medbay_channels = list(
|
||||
..()
|
||||
wires = new(src)
|
||||
internal_channels = default_internal_channels.Copy()
|
||||
listening_objects += src
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
listening_objects -= src
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for (var/ch_name in channels)
|
||||
@@ -474,7 +476,6 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
|
||||
|
||||
if (broadcasting)
|
||||
if(get_dist(src, M) <= canhear_range)
|
||||
talk_into(M, msg,null,verb,speaking)
|
||||
|
||||
@@ -69,7 +69,7 @@ REAGENT SCANNER
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:</span>")
|
||||
user.show_message("<span class='notice'>Overall Status: dead</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[round((M.health/M.maxHealth)*100) ]% healthy"]</span>")
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[round((M.health/M.getMaxHealth())*100) ]% healthy"]</span>")
|
||||
user.show_message("<span class='notice'> Key: <font color='cyan'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font></span>", 1)
|
||||
user.show_message("<span class='notice'> Damage Specifics: <font color='cyan'>[OX]</font> - <font color='green'>[TX]</font> - <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font></span>")
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
|
||||
@@ -39,7 +39,7 @@ RSF
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if (mode == 1)
|
||||
mode = 2
|
||||
user << "Changed dispensing mode to 'Drinking Glass'"
|
||||
user << "Changed dispensing mode to 'Drinking Glass:Pint'"
|
||||
return
|
||||
if (mode == 2)
|
||||
mode = 3
|
||||
@@ -82,7 +82,7 @@ RSF
|
||||
product = new /obj/item/clothing/mask/smokable/cigarette()
|
||||
used_energy = 10
|
||||
if(2)
|
||||
product = new /obj/item/weapon/reagent_containers/food/drinks/glass2()
|
||||
product = new /obj/item/weapon/reagent_containers/food/drinks/glass2/pint()
|
||||
used_energy = 50
|
||||
if(3)
|
||||
product = new /obj/item/weapon/paper()
|
||||
|
||||
@@ -399,21 +399,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
..()
|
||||
name = "empty [initial(name)]"
|
||||
|
||||
/obj/item/clothing/mask/smokable/pipe/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit && src.smoketime)
|
||||
src.lit = 1
|
||||
damtype = "fire"
|
||||
icon_state = icon_on
|
||||
item_state = icon_on
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(flavor_text)
|
||||
processing_objects.Add(src)
|
||||
if(ismob(loc))
|
||||
var/mob/living/M = loc
|
||||
M.update_inv_wear_mask(0)
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(1)
|
||||
|
||||
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
|
||||
if(lit == 1)
|
||||
if(user.a_intent == I_HURT)
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
IC.examine(user)
|
||||
|
||||
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) )
|
||||
if(istype(O, /obj/item/weapon/crowbar) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || istype(O, /obj/item/weapon/screwdriver) || istype(O, /obj/item/weapon/cell/device) )
|
||||
IC.attackby(O, user)
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/implant/integrated_circuit/attack_self(mob/user)
|
||||
IC.attack_self(user)
|
||||
263
code/game/objects/items/weapons/material/material_armor.dm
Normal file
263
code/game/objects/items/weapons/material/material_armor.dm
Normal file
@@ -0,0 +1,263 @@
|
||||
#define MATERIAL_ARMOR_COEFFICENT 0.05
|
||||
/*
|
||||
SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
|
||||
This class of armor takes armor and appearance data from a material "datum".
|
||||
They are also fragile based on material data and many can break/smash apart when hit.
|
||||
|
||||
Materials has a var called protectiveness which plays a major factor in how good it is for armor.
|
||||
With the coefficent being 0.05, this is how strong different levels of protectiveness are (for melee)
|
||||
For bullets and lasers, material hardness and reflectivity also play a major role, respectively.
|
||||
|
||||
|
||||
Protectiveness | Armor %
|
||||
0 = 0%
|
||||
5 = 20%
|
||||
10 = 33%
|
||||
15 = 42%
|
||||
20 = 50%
|
||||
25 = 55%
|
||||
30 = 60%
|
||||
40 = 66%
|
||||
50 = 71%
|
||||
60 = 75%
|
||||
70 = 77%
|
||||
80 = 80%
|
||||
*/
|
||||
|
||||
|
||||
// Putting these at /clothing/ level saves a lot of code duplication in armor/helmets/gauntlets/etc
|
||||
/obj/item/clothing
|
||||
var/material/material = null // Why isn't this a datum?
|
||||
var/applies_material_color = TRUE
|
||||
var/unbreakable = FALSE
|
||||
var/default_material = null // Set this to something else if you want material attributes on init.
|
||||
var/material_armor_modifer = 1 // Adjust if you want seperate types of armor made from the same material to have different protectiveness (e.g. makeshift vs real armor)
|
||||
|
||||
/obj/item/clothing/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
if(!material_key)
|
||||
material_key = default_material
|
||||
if(material_key) // May still be null if a material was not specified as a default.
|
||||
set_material(material_key)
|
||||
|
||||
/obj/item/clothing/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/clothing/get_material()
|
||||
return material
|
||||
|
||||
// Debating if this should be made an /obj/item/ proc.
|
||||
/obj/item/clothing/proc/set_material(var/new_material)
|
||||
material = get_material_by_name(new_material)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
health = round(material.integrity/10)
|
||||
if(applies_material_color)
|
||||
color = material.icon_colour
|
||||
if(material.products_need_process())
|
||||
processing_objects |= src
|
||||
update_armor()
|
||||
|
||||
// This is called when someone wearing the object gets hit in some form (melee, bullet_act(), etc).
|
||||
// Note that this cannot change if someone gets hurt, as it merely reacts to being hit.
|
||||
/obj/item/clothing/proc/clothing_impact(var/obj/source, var/damage)
|
||||
if(material && damage)
|
||||
material_impact(source, damage)
|
||||
|
||||
/obj/item/clothing/proc/material_impact(var/obj/source, var/damage)
|
||||
if(!material || unbreakable)
|
||||
return
|
||||
|
||||
if(istype(source, /obj/item/projectile))
|
||||
var/obj/item/projectile/P = source
|
||||
if(P.pass_flags & PASSGLASS)
|
||||
if(material.opacity - 0.3 <= 0)
|
||||
return // Lasers ignore 'fully' transparent material.
|
||||
|
||||
if(material.is_brittle())
|
||||
health = 0
|
||||
else if(!prob(material.hardness))
|
||||
health--
|
||||
|
||||
if(health <= 0)
|
||||
shatter()
|
||||
|
||||
/obj/item/clothing/proc/shatter()
|
||||
if(!material)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
if(material.shard_type == SHARD_SHARD) // Wearing glass armor is a bad idea.
|
||||
var/obj/item/weapon/material/shard/S = material.place_shard(T)
|
||||
M.embed(S)
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
qdel(src)
|
||||
|
||||
// Might be best to make ablative vests a material armor using a new material to cut down on this copypaste.
|
||||
/obj/item/clothing/suit/armor/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(!material) // No point checking for reflection.
|
||||
return ..()
|
||||
|
||||
if(material.reflectivity)
|
||||
if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
|
||||
if(P.reflected) // Can't reflect twice
|
||||
return ..()
|
||||
|
||||
var/reflectchance = (40 * material.reflectivity) - round(damage/3)
|
||||
reflectchance *= material_armor_modifer
|
||||
if(!(def_zone in list(BP_TORSO, BP_GROIN)))
|
||||
reflectchance /= 2
|
||||
if(P.starting && prob(reflectchance))
|
||||
visible_message("<span class='danger'>\The [user]'s [src.name] reflects [attack_text]!</span>")
|
||||
|
||||
// Find a turf near or on the original location to bounce to
|
||||
var/new_x = P.starting.x + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/curloc = get_turf(user)
|
||||
|
||||
// redirect the projectile
|
||||
P.redirect(new_x, new_y, curloc, user)
|
||||
P.reflected = 1
|
||||
|
||||
return PROJECTILE_CONTINUE // complete projectile permutation
|
||||
|
||||
/proc/calculate_material_armor(amount)
|
||||
var/result = 1 - MATERIAL_ARMOR_COEFFICENT * amount / (1 + MATERIAL_ARMOR_COEFFICENT * abs(amount))
|
||||
result = result * 100
|
||||
result = abs(result - 100)
|
||||
return round(result)
|
||||
|
||||
|
||||
/obj/item/clothing/proc/update_armor()
|
||||
if(material)
|
||||
var/melee_armor = 0, bullet_armor = 0, laser_armor = 0, energy_armor = 0, bomb_armor = 0
|
||||
|
||||
melee_armor = calculate_material_armor(material.protectiveness * material_armor_modifer)
|
||||
|
||||
bullet_armor = calculate_material_armor((material.protectiveness * (material.hardness / 100) * material_armor_modifer) * 0.7)
|
||||
|
||||
laser_armor = calculate_material_armor((material.protectiveness * (material.reflectivity + 1) * material_armor_modifer) * 0.7)
|
||||
if(material.opacity != 1)
|
||||
laser_armor *= max(material.opacity - 0.3, 0) // Glass and such has an opacity of 0.3, but lasers should go through glass armor entirely.
|
||||
|
||||
energy_armor = calculate_material_armor((material.protectiveness * material_armor_modifer) * 0.4)
|
||||
|
||||
bomb_armor = calculate_material_armor((material.protectiveness * material_armor_modifer) * 0.5)
|
||||
|
||||
// Makes sure the numbers stay capped.
|
||||
for(var/number in list(melee_armor, bullet_armor, laser_armor, energy_armor, bomb_armor))
|
||||
number = between(0, number, 100)
|
||||
|
||||
armor["melee"] = melee_armor
|
||||
armor["bullet"] = bullet_armor
|
||||
armor["laser"] = laser_armor
|
||||
armor["energy"] = energy_armor
|
||||
armor["bomb"] = bomb_armor
|
||||
|
||||
if(!isnull(material.conductivity))
|
||||
siemens_coefficient = between(0, material.conductivity / 10, 10)
|
||||
slowdown = between(0, round(material.weight / 10, 0.1), 6)
|
||||
|
||||
/obj/item/clothing/suit/armor/material
|
||||
name = "armor"
|
||||
default_material = DEFAULT_WALL_MATERIAL
|
||||
|
||||
/obj/item/clothing/suit/armor/material/makeshift
|
||||
name = "sheet armor"
|
||||
desc = "This appears to be two 'sheets' of a material held together by cable. If the sheets are strong, this could be rather protective."
|
||||
icon_state = "material_armor_makeshift"
|
||||
|
||||
/obj/item/clothing/suit/armor/material/makeshift/durasteel
|
||||
default_material = "durasteel"
|
||||
|
||||
/obj/item/clothing/suit/armor/material/makeshift/glass
|
||||
default_material = "glass"
|
||||
|
||||
// Used to craft sheet armor, and possibly other things in the Future(tm).
|
||||
/obj/item/weapon/material/armor_plating
|
||||
name = "armor plating"
|
||||
desc = "A sheet designed to protect something."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "armor_plate"
|
||||
unbreakable = TRUE
|
||||
force_divisor = 0.05 // Really bad as a weapon.
|
||||
thrown_force_divisor = 0.2
|
||||
var/wired = FALSE
|
||||
|
||||
/obj/item/weapon/material/armor_plating/attackby(var/obj/O, mob/user)
|
||||
if(istype(O, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/S = O
|
||||
if(wired)
|
||||
to_chat(user, "<span class='warning'>This already has enough wires on it.</span>")
|
||||
return
|
||||
if(S.use(20))
|
||||
to_chat(user, "<span class='notice'>You attach several wires to \the [src]. Now it needs another plate.</span>")
|
||||
wired = TRUE
|
||||
icon_state = "[initial(icon_state)]_wired"
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more wire for that.</span>")
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/material/armor_plating))
|
||||
var/obj/item/weapon/material/armor_plating/second_plate = O
|
||||
if(!wired && !second_plate.wired)
|
||||
to_chat(user, "<span class='warning'>You need something to hold the two pieces of plating together.</span>")
|
||||
return
|
||||
if(second_plate.material != src.material)
|
||||
to_chat(user, "<span class='warning'>Both plates need to be the same type of material.</span>")
|
||||
return
|
||||
user.drop_from_inventory(src)
|
||||
user.drop_from_inventory(second_plate)
|
||||
var/obj/item/clothing/suit/armor/material/makeshift/new_armor = new(null, src.material.name)
|
||||
user.put_in_hands(new_armor)
|
||||
qdel(second_plate)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
// Used to craft the makeshift helmet
|
||||
/obj/item/clothing/head/helmet/bucket
|
||||
name = "bucket"
|
||||
desc = "It's a bucket with a large hole cut into it. You could wear it on your head and look really stupid."
|
||||
flags_inv = HIDEEARS|HIDEEYES|BLOCKHAIR
|
||||
icon_state = "bucket"
|
||||
armor = list(melee = 5, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
/obj/item/clothing/head/helmet/bucket/attackby(var/obj/O, mob/user)
|
||||
if(istype(O, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/S = O
|
||||
if(S.use(2))
|
||||
to_chat(user, "<span class='notice'>You apply some [S.material.use_name] to \the [src]. Hopefully it'll make the makeshift helmet stronger.</span>")
|
||||
var/obj/item/clothing/head/helmet/material/makeshift/helmet = new(null, S.material.name)
|
||||
user.put_in_hands(helmet)
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough material to build a helmet!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/helmet/material
|
||||
name = "helmet"
|
||||
flags_inv = HIDEEARS|HIDEEYES|BLOCKHAIR
|
||||
default_material = DEFAULT_WALL_MATERIAL
|
||||
|
||||
/obj/item/clothing/head/helmet/material/makeshift
|
||||
name = "bucket"
|
||||
desc = "A bucket with plating applied to the outside. Very crude, but could potentially be rather protective, if \
|
||||
it was plated with something strong."
|
||||
icon_state = "material_armor_makeshift"
|
||||
|
||||
/obj/item/clothing/head/helmet/material/makeshift/durasteel
|
||||
default_material = "durasteel"
|
||||
@@ -32,4 +32,9 @@
|
||||
|
||||
/obj/item/weapon/permit/gun/bar
|
||||
name = "bar shotgun permit"
|
||||
desc = "A card indicating that the owner is allowed to carry a shotgun in the bar."
|
||||
desc = "A card indicating that the owner is allowed to carry a shotgun in the bar."
|
||||
|
||||
/obj/item/weapon/permit/drone
|
||||
name = "drone identification card"
|
||||
desc = "A card issued by the EIO, indicating that the owner is a Drone Intelligence. Drones are mandated to carry this card within SolGov space, by law."
|
||||
icon_state = "drone"
|
||||
@@ -2,12 +2,12 @@
|
||||
/obj/item/taperoll
|
||||
name = "tape roll"
|
||||
icon = 'icons/policetape.dmi'
|
||||
icon_state = "rollstart"
|
||||
icon_state = "tape"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/turf/start
|
||||
var/turf/end
|
||||
var/tape_type = /obj/item/tape
|
||||
var/icon_base
|
||||
var/icon_base = "tape"
|
||||
|
||||
var/apply_tape = FALSE
|
||||
|
||||
@@ -33,7 +33,7 @@ var/list/tape_roll_applications = list()
|
||||
var/lifted = 0
|
||||
var/crumpled = 0
|
||||
var/tape_dir = 0
|
||||
var/icon_base
|
||||
var/icon_base = "tape"
|
||||
|
||||
/obj/item/tape/update_icon()
|
||||
//Possible directional bitflags: 0 (AIRLOCK), 1 (NORTH), 2 (SOUTH), 4 (EAST), 8 (WEST), 3 (VERTICAL), 12 (HORIZONTAL)
|
||||
@@ -60,22 +60,20 @@ var/list/tape_roll_applications = list()
|
||||
/obj/item/taperoll/police
|
||||
name = "police tape"
|
||||
desc = "A roll of police tape used to block off crime scenes from the public."
|
||||
icon_state = "police"
|
||||
tape_type = /obj/item/tape/police
|
||||
icon_base = "police"
|
||||
color = COLOR_RED_LIGHT
|
||||
|
||||
/obj/item/tape/police
|
||||
name = "police tape"
|
||||
desc = "A length of police tape. Do not cross."
|
||||
req_access = list(access_security)
|
||||
icon_base = "police"
|
||||
color = COLOR_RED_LIGHT
|
||||
|
||||
/obj/item/taperoll/engineering
|
||||
name = "engineering tape"
|
||||
desc = "A roll of engineering tape used to block off working areas from the public."
|
||||
icon_state = "engineering"
|
||||
tape_type = /obj/item/tape/engineering
|
||||
icon_base = "engineering"
|
||||
color = COLOR_YELLOW
|
||||
|
||||
/obj/item/taperoll/engineering/applied
|
||||
apply_tape = TRUE
|
||||
@@ -84,28 +82,31 @@ var/list/tape_roll_applications = list()
|
||||
name = "engineering tape"
|
||||
desc = "A length of engineering tape. Better not cross it."
|
||||
req_one_access = list(access_engine,access_atmospherics)
|
||||
icon_base = "engineering"
|
||||
color = COLOR_YELLOW
|
||||
|
||||
/obj/item/taperoll/atmos
|
||||
name = "atmospherics tape"
|
||||
desc = "A roll of atmospherics tape used to block off working areas from the public."
|
||||
icon_state = "atmos"
|
||||
tape_type = /obj/item/tape/atmos
|
||||
icon_base = "atmos"
|
||||
color = COLOR_DEEP_SKY_BLUE
|
||||
|
||||
/obj/item/tape/atmos
|
||||
name = "atmospherics tape"
|
||||
desc = "A length of atmospherics tape. Better not cross it."
|
||||
req_one_access = list(access_engine,access_atmospherics)
|
||||
icon_base = "atmos"
|
||||
color = COLOR_DEEP_SKY_BLUE
|
||||
|
||||
/obj/item/taperoll/update_icon()
|
||||
overlays.Cut()
|
||||
var/image/overlay = image(icon = src.icon)
|
||||
overlay.appearance_flags = RESET_COLOR
|
||||
if(ismob(loc))
|
||||
if(!start)
|
||||
overlays += "start"
|
||||
overlay.icon_state = "start"
|
||||
else
|
||||
overlays += "stop"
|
||||
overlay.icon_state = "stop"
|
||||
overlays += overlay
|
||||
|
||||
|
||||
/obj/item/taperoll/dropped(mob/user)
|
||||
update_icon()
|
||||
|
||||
@@ -163,6 +163,15 @@
|
||||
overlays = null
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/ducttape/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!(istype(src, /obj/item/weapon/handcuffs/cable/tape) || istype(src, /obj/item/clothing/mask/muzzle/tape)))
|
||||
return ..()
|
||||
else
|
||||
user.drop_from_inventory(I)
|
||||
I.loc = src
|
||||
qdel(I)
|
||||
to_chat(user, "<span-class='notice'>You place \the [I] back into \the [src].</span>")
|
||||
|
||||
/obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params)
|
||||
|
||||
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
user.sdisabilities |= BLIND
|
||||
else if (E.damage >= E.min_bruised_damage)
|
||||
user << "<span class='danger'>You go blind!</span>"
|
||||
user.eye_blind = 5
|
||||
user.Blind(5)
|
||||
user.eye_blurry = 5
|
||||
user.disabilities |= NEARSIGHTED
|
||||
spawn(100)
|
||||
|
||||
@@ -77,34 +77,44 @@
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
close()
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, src.dir)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, src.dir)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "morguet"
|
||||
src.connected.set_dir(src.dir)
|
||||
else
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
open()
|
||||
src.add_fingerprint(user)
|
||||
update()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/morgue/proc/close()
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
|
||||
|
||||
/obj/structure/morgue/proc/open()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, src.dir)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, src.dir)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "morguet"
|
||||
src.connected.set_dir(src.dir)
|
||||
else
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
@@ -123,21 +133,8 @@
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, EAST)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, EAST)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.connected.loc)
|
||||
src.connected.icon_state = "morguet"
|
||||
else
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
return
|
||||
|
||||
if (user in src.occupants)
|
||||
open()
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
|
||||
@@ -37,6 +37,7 @@ var/list/flooring_types
|
||||
var/descriptor = "tiles"
|
||||
var/flags
|
||||
var/can_paint
|
||||
var/list/footstep_sounds = list() // key=species name, value = list of soundss
|
||||
|
||||
/decl/flooring/grass
|
||||
name = "grass"
|
||||
@@ -90,6 +91,12 @@ var/list/flooring_types
|
||||
build_type = /obj/item/stack/tile/carpet
|
||||
damage_temperature = T0C+200
|
||||
flags = TURF_HAS_EDGES | TURF_HAS_CORNERS | TURF_REMOVE_CROWBAR | TURF_CAN_BURN
|
||||
footstep_sounds = list("human" = list(
|
||||
'sound/effects/footstep/carpet1.ogg',
|
||||
'sound/effects/footstep/carpet2.ogg',
|
||||
'sound/effects/footstep/carpet3.ogg',
|
||||
'sound/effects/footstep/carpet4.ogg',
|
||||
'sound/effects/footstep/carpet5.ogg'))
|
||||
|
||||
/decl/flooring/carpet/blue
|
||||
name = "carpet"
|
||||
@@ -107,6 +114,12 @@ var/list/flooring_types
|
||||
flags = TURF_REMOVE_CROWBAR | TURF_CAN_BREAK | TURF_CAN_BURN
|
||||
build_type = /obj/item/stack/tile/floor
|
||||
can_paint = 1
|
||||
footstep_sounds = list("human" = list(
|
||||
'sound/effects/footstep/floor1.ogg',
|
||||
'sound/effects/footstep/floor2.ogg',
|
||||
'sound/effects/footstep/floor3.ogg',
|
||||
'sound/effects/footstep/floor4.ogg',
|
||||
'sound/effects/footstep/floor5.ogg'))
|
||||
|
||||
/decl/flooring/linoleum
|
||||
name = "linoleum"
|
||||
@@ -193,6 +206,12 @@ var/list/flooring_types
|
||||
descriptor = "planks"
|
||||
build_type = /obj/item/stack/tile/wood
|
||||
flags = TURF_CAN_BREAK | TURF_IS_FRAGILE | TURF_REMOVE_SCREWDRIVER
|
||||
footstep_sounds = list("human" = list(
|
||||
'sound/effects/footstep/wood1.ogg',
|
||||
'sound/effects/footstep/wood2.ogg',
|
||||
'sound/effects/footstep/wood3.ogg',
|
||||
'sound/effects/footstep/wood4.ogg',
|
||||
'sound/effects/footstep/wood5.ogg'))
|
||||
|
||||
/decl/flooring/reinforced
|
||||
name = "reinforced floor"
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
var/base_desc = "The naked hull."
|
||||
var/base_icon = 'icons/turf/flooring/plating.dmi'
|
||||
var/base_icon_state = "plating"
|
||||
var/static/list/base_footstep_sounds = list("human" = list(
|
||||
'sound/effects/footstep/plating1.ogg',
|
||||
'sound/effects/footstep/plating2.ogg',
|
||||
'sound/effects/footstep/plating3.ogg',
|
||||
'sound/effects/footstep/plating4.ogg',
|
||||
'sound/effects/footstep/plating5.ogg'))
|
||||
|
||||
// Flooring data.
|
||||
var/flooring_override
|
||||
@@ -33,10 +39,13 @@
|
||||
floortype = initial_flooring
|
||||
if(floortype)
|
||||
set_flooring(get_flooring_data(floortype))
|
||||
else
|
||||
footstep_sounds = base_footstep_sounds
|
||||
|
||||
/turf/simulated/floor/proc/set_flooring(var/decl/flooring/newflooring)
|
||||
make_plating(defer_icon_update = 1)
|
||||
flooring = newflooring
|
||||
footstep_sounds = newflooring.footstep_sounds
|
||||
update_icon(1)
|
||||
levelupdate()
|
||||
|
||||
@@ -53,6 +62,7 @@
|
||||
desc = base_desc
|
||||
icon = base_icon
|
||||
icon_state = base_icon_state
|
||||
footstep_sounds = base_footstep_sounds
|
||||
|
||||
if(flooring)
|
||||
if(flooring.build_type && place_product)
|
||||
|
||||
@@ -31,17 +31,19 @@ var/list/outdoor_turfs = list()
|
||||
|
||||
/turf/simulated/floor/Destroy()
|
||||
if(outdoors)
|
||||
outdoor_turfs.Remove(src)
|
||||
planet_controller.unallocateTurf(src)
|
||||
..()
|
||||
|
||||
/turf/simulated/floor/proc/update_icon_edge()
|
||||
/turf/simulated/proc/update_icon_edge()
|
||||
if(edge_blending_priority)
|
||||
for(var/checkdir in cardinal)
|
||||
var/turf/simulated/T = get_step(src, checkdir)
|
||||
if(istype(T) && T.edge_blending_priority && edge_blending_priority < T.edge_blending_priority && icon_state != T.icon_state)
|
||||
var/cache_key = "[T.get_edge_icon_state()]-[checkdir]"
|
||||
if(!turf_edge_cache[cache_key])
|
||||
turf_edge_cache[cache_key] = image(icon = 'icons/turf/outdoors_edge.dmi', icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir)
|
||||
var/image/I = image(icon = 'icons/turf/outdoors_edge.dmi', icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir)
|
||||
I.plane = 0
|
||||
turf_edge_cache[cache_key] = I
|
||||
overlays += turf_edge_cache[cache_key]
|
||||
|
||||
/turf/simulated/proc/get_edge_icon_state()
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
var/movement_cost = 0 // How much the turf slows down movement, if any.
|
||||
|
||||
var/list/footstep_sounds = null
|
||||
|
||||
/turf/New()
|
||||
..()
|
||||
for(var/atom/movable/AM as mob|obj in src)
|
||||
@@ -145,6 +147,9 @@ var/const/enterloopsanity = 100
|
||||
else if(!is_space())
|
||||
M.inertia_dir = 0
|
||||
M.make_floating(0)
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
L.handle_footstep(src)
|
||||
..()
|
||||
var/objects = 0
|
||||
if(A && (A.flags & PROXMOVE))
|
||||
|
||||
@@ -27,6 +27,15 @@ var/list/planetary_walls = list()
|
||||
planetary_walls.Remove(src)
|
||||
..()
|
||||
|
||||
/turf/unsimulated/wall/planetary/proc/set_temperature(var/new_temperature)
|
||||
if(new_temperature == temperature)
|
||||
return
|
||||
temperature = new_temperature
|
||||
// Force ZAS to reconsider our connections because our temperature has changed
|
||||
if(connections)
|
||||
connections.erase_all()
|
||||
air_master.mark_for_update(src)
|
||||
|
||||
// Normal station/earth air.
|
||||
/turf/unsimulated/wall/planetary/normal
|
||||
oxygen = MOLES_O2STANDARD
|
||||
@@ -55,3 +64,4 @@ var/list/planetary_walls = list()
|
||||
oxygen = MOLES_O2STANDARD
|
||||
nitrogen = MOLES_N2STANDARD
|
||||
temperature = 310.92 // About 37.7C / 100F
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
suiciding = 1
|
||||
viewers(src) << "<span class='danger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>"
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/robot/verb/suicide()
|
||||
@@ -147,7 +147,7 @@
|
||||
suiciding = 1
|
||||
viewers(src) << "<span class='danger'>[src] is powering down. It looks like \he's trying to commit suicide.</span>"
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
|
||||
@@ -408,6 +408,7 @@
|
||||
projectile_type = /obj/item/projectile/chameleon
|
||||
charge_meter = 0
|
||||
charge_cost = 48 //uses next to no power, since it's just holograms
|
||||
battery_lock = 1
|
||||
|
||||
var/obj/item/projectile/copy_projectile
|
||||
var/global/list/gun_choices
|
||||
|
||||
@@ -347,7 +347,9 @@
|
||||
body_parts_covered = FACE|EYES
|
||||
sprite_sheets = list(
|
||||
"Teshari" = 'icons/mob/species/seromi/masks.dmi',
|
||||
"Vox" = 'icons/mob/species/vox/masks.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/masks.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/mask.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/mask.dmi'
|
||||
)
|
||||
|
||||
var/voicechange = 0
|
||||
|
||||
@@ -402,7 +402,7 @@ BLIND // can't see anything
|
||||
var/mob/living/carbon/human/M = src.loc
|
||||
M << "\red The Optical Thermal Scanner overloads and blinds you!"
|
||||
if(M.glasses == src)
|
||||
M.eye_blind = 3
|
||||
M.Blind(3)
|
||||
M.eye_blurry = 5
|
||||
// Don't cure being nearsighted
|
||||
if(!(M.disabilities & NEARSIGHTED))
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
flags_inv = HIDEFACE|BLOCKHAIR
|
||||
body_parts_covered = FACE|HEAD
|
||||
w_class = ITEMSIZE_SMALL
|
||||
sprite_sheets = list(
|
||||
"Tajara" = 'icons/mob/species/tajaran/mask.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/balaclava/tactical
|
||||
name = "green balaclava"
|
||||
@@ -18,10 +14,6 @@
|
||||
item_state_slots = list(slot_r_hand_str = "bandgreen", slot_l_hand_str = "bandgreen")
|
||||
flags_inv = HIDEFACE|BLOCKHAIR
|
||||
w_class = ITEMSIZE_SMALL
|
||||
sprite_sheets = list(
|
||||
"Tajara" = 'icons/mob/species/tajaran/mask.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/luchador
|
||||
name = "Luchador Mask"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
item_flags = STOPPRESSUREDAMAGE | THICKMATERIAL | PHORONGUARD
|
||||
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)
|
||||
phoronproof = 1
|
||||
slowdown = 2
|
||||
slowdown = 0.5
|
||||
armor = list(melee = 60, bullet = 50, laser = 40,energy = 15, bomb = 30, bio = 100, rad = 50)
|
||||
siemens_coefficient = 0.2
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
|
||||
@@ -80,6 +80,9 @@
|
||||
if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/P = damage_source
|
||||
|
||||
if(P.reflected) // Can't reflect twice
|
||||
return ..()
|
||||
|
||||
var/reflectchance = 40 - round(damage/3)
|
||||
if(!(def_zone in list(BP_TORSO, BP_GROIN)))
|
||||
reflectchance /= 2
|
||||
|
||||
@@ -76,10 +76,12 @@
|
||||
|
||||
/obj/item/clothing/accessory/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
..()
|
||||
has_suit.verbs += /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||
if(has_suit)
|
||||
has_suit.verbs += /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||
|
||||
/obj/item/clothing/accessory/holster/on_removed(mob/user as mob)
|
||||
has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||
if(has_suit)
|
||||
has_suit.verbs -= /obj/item/clothing/accessory/holster/verb/holster_verb
|
||||
..()
|
||||
|
||||
//For the holster hotkey
|
||||
|
||||
@@ -41,9 +41,11 @@
|
||||
i++
|
||||
|
||||
/datum/event/carp_migration/end()
|
||||
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
|
||||
if(!C.stat)
|
||||
var/turf/T = get_turf(C)
|
||||
if(istype(T, /turf/space))
|
||||
if(!prob(25))
|
||||
qdel(C)
|
||||
spawn(0)
|
||||
for(var/mob/living/simple_animal/hostile/C in spawned_carp)
|
||||
if(!C.stat)
|
||||
var/turf/T = get_turf(C)
|
||||
if(istype(T, /turf/space))
|
||||
if(prob(75))
|
||||
qdel(C)
|
||||
sleep(1)
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
finish(mob/living/carbon/human/H)
|
||||
if(!H.reagents.has_reagent("anti_toxin"))
|
||||
H.confused += 100
|
||||
H.Confuse(100)
|
||||
|
||||
proc/trigger_side_effect(mob/living/carbon/human/H)
|
||||
spawn
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box.
|
||||
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be autogenerated for RnD.
|
||||
|
||||
#define IC_FORMAT_STRING "\<STRING\>"
|
||||
#define IC_FORMAT_STRING "\<TEXT\>"
|
||||
#define IC_FORMAT_NUMBER "\<NUM\>"
|
||||
#define IC_FORMAT_REF "\<REF\>"
|
||||
#define IC_FORMAT_LIST "\<LIST\>"
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
for(var/obj/item/integrated_circuit/circuit in contents)
|
||||
HTML += "<a href=?src=\ref[circuit];examine=1>[circuit.name]</a> | "
|
||||
HTML += "<a href=?src=\ref[circuit];rename=1>\[Rename\]</a> | "
|
||||
HTML += "<a href=?src=\ref[circuit];scan=1>\[Scan with Debugger\]</a> | "
|
||||
if(circuit.removable)
|
||||
HTML += "<a href=?src=\ref[circuit];remove=1>\[Remove\]</a>"
|
||||
HTML += "<br>"
|
||||
@@ -223,9 +224,10 @@
|
||||
if(proximity)
|
||||
var/scanned = FALSE
|
||||
for(var/obj/item/integrated_circuit/input/sensor/S in contents)
|
||||
S.set_pin_data(IC_OUTPUT, 1, weakref(target))
|
||||
S.check_then_do_work()
|
||||
scanned = TRUE
|
||||
// S.set_pin_data(IC_OUTPUT, 1, weakref(target))
|
||||
// S.check_then_do_work()
|
||||
if(S.scan(target))
|
||||
scanned = TRUE
|
||||
if(scanned)
|
||||
visible_message("<span class='notice'>\The [user] waves \the [src] around [target].</span>")
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
/obj/item/integrated_circuit/examine(mob/user)
|
||||
. = ..()
|
||||
external_examine(user)
|
||||
interact(user)
|
||||
|
||||
// This should be used when someone is examining while the case is opened.
|
||||
/obj/item/integrated_circuit/proc/internal_examine(mob/user)
|
||||
@@ -86,16 +87,14 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
var/HTML = list()
|
||||
HTML += "<html><head><title>[src.name]</title></head><body>"
|
||||
HTML += "<div align='center'>"
|
||||
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 424px'>"
|
||||
HTML += "<table border='1' style='undefined;table-layout: fixed; width: 80%'>"
|
||||
|
||||
HTML += "<br><a href='?src=\ref[src];'>\[Refresh\]</a> | "
|
||||
HTML += "<a href='?src=\ref[src];rename=1'>\[Rename\]</a> | "
|
||||
HTML += "<a href='?src=\ref[src];scan=1'>\[Scan with Debugger\]</a> | "
|
||||
HTML += "<a href='?src=\ref[src];remove=1'>\[Remove\]</a><br>"
|
||||
|
||||
HTML += "<colgroup>"
|
||||
//HTML += "<col style='width: 121px'>"
|
||||
//HTML += "<col style='width: 181px'>"
|
||||
//HTML += "<col style='width: 122px'>"
|
||||
HTML += "<col style='width: [table_edge_width]'>"
|
||||
HTML += "<col style='width: [table_middle_width]'>"
|
||||
HTML += "<col style='width: [table_edge_width]'>"
|
||||
@@ -212,6 +211,16 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
if(href_list["rename"])
|
||||
rename_component(usr)
|
||||
|
||||
if(href_list["scan"])
|
||||
if(istype(held_item, /obj/item/device/integrated_electronics/debugger))
|
||||
var/obj/item/device/integrated_electronics/debugger/D = held_item
|
||||
if(D.accepting_refs)
|
||||
D.afterattack(src, usr, TRUE)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You need a Debugger set to 'ref' mode to do that.</span>")
|
||||
|
||||
if(href_list["autopulse"])
|
||||
if(autopulse != -1)
|
||||
autopulse = !autopulse
|
||||
@@ -260,10 +269,10 @@ a creative player the means to solve many problems. Circuits are held inside an
|
||||
return TRUE // Battery has enough.
|
||||
return FALSE // Not enough power.
|
||||
|
||||
/obj/item/integrated_circuit/proc/check_then_do_work()
|
||||
/obj/item/integrated_circuit/proc/check_then_do_work(var/ignore_power = FALSE)
|
||||
if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam.
|
||||
return
|
||||
if(power_draw_per_use)
|
||||
if(power_draw_per_use && !ignore_power)
|
||||
if(!check_power())
|
||||
power_fail()
|
||||
return
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
data_to_show = A.name
|
||||
to_chat(user, "<span class='notice'>You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].</span>")
|
||||
else if(io.io_type == PULSE_CHANNEL)
|
||||
io.holder.check_then_do_work()
|
||||
io.holder.check_then_do_work(ignore_power = TRUE)
|
||||
to_chat(user, "<span class='notice'>You pulse \the [io.holder]'s [io].</span>")
|
||||
|
||||
io.holder.interact(user) // This is to update the UI.
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
//These circuits do simple math.
|
||||
/obj/item/integrated_circuit/arithmetic
|
||||
complexity = 1
|
||||
inputs = list("A","B","C","D","E","F","G","H")
|
||||
outputs = list("result")
|
||||
activators = list("compute")
|
||||
inputs = list(
|
||||
"\<NUM\> A",
|
||||
"\<NUM\> B",
|
||||
"\<NUM\> C",
|
||||
"\<NUM\> D",
|
||||
"\<NUM\> E",
|
||||
"\<NUM\> F",
|
||||
"\<NUM\> G",
|
||||
"\<NUM\> H"
|
||||
)
|
||||
outputs = list("\<NUM\> result")
|
||||
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
|
||||
category_text = "Arithmetic"
|
||||
autopulse = 1
|
||||
power_draw_per_use = 5 // Math is pretty cheap.
|
||||
@@ -30,9 +39,9 @@
|
||||
if(isnum(I.data))
|
||||
result = result + I.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// -Subtracting- //
|
||||
|
||||
@@ -58,9 +67,9 @@
|
||||
if(isnum(I.data))
|
||||
result = result - I.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// *Multiply* //
|
||||
|
||||
@@ -86,9 +95,9 @@
|
||||
if(isnum(I.data))
|
||||
result = result * I.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// /Division/ //
|
||||
|
||||
@@ -114,9 +123,9 @@
|
||||
if(isnum(I.data) && I.data != 0) //No runtimes here.
|
||||
result = result / I.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
//^ Exponent ^//
|
||||
|
||||
@@ -134,9 +143,9 @@
|
||||
if(isnum(A.data) && isnum(B.data))
|
||||
result = A.data ** B.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// +-Sign-+ //
|
||||
|
||||
@@ -159,9 +168,9 @@
|
||||
else
|
||||
result = 0
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Round //
|
||||
|
||||
@@ -183,9 +192,9 @@
|
||||
else
|
||||
result = round(A.data)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
// Absolute //
|
||||
@@ -204,9 +213,9 @@
|
||||
if(isnum(I.data))
|
||||
result = abs(I.data)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Averaging //
|
||||
|
||||
@@ -229,9 +238,9 @@
|
||||
if(inputs_used)
|
||||
result = result / inputs_used
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Pi, because why the hell not? //
|
||||
/obj/item/integrated_circuit/arithmetic/pi
|
||||
@@ -242,9 +251,9 @@
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/pi/do_work()
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = 3.14159
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, 3.14159)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Random //
|
||||
/obj/item/integrated_circuit/arithmetic/random
|
||||
@@ -253,20 +262,20 @@
|
||||
extended_desc = "'Inclusive' means that the upper bound is included in the range of numbers, e.g. L = 1 and H = 3 will allow \
|
||||
for outputs of 1, 2, or 3. H being the higher number is not <i>strictly</i> required."
|
||||
icon_state = "random"
|
||||
inputs = list("L","H")
|
||||
inputs = list("\<NUM\> L","\<NUM\> H")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/random/do_work()
|
||||
var/result = 0
|
||||
var/datum/integrated_io/L = inputs[1]
|
||||
var/datum/integrated_io/H = inputs[2]
|
||||
var/L = get_pin_data(IC_INPUT, 1)
|
||||
var/H = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
if(isnum(L.data) && isnum(H.data))
|
||||
result = rand(L.data, H.data)
|
||||
if(isnum(L) && isnum(H))
|
||||
result = rand(L, H)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Square Root //
|
||||
|
||||
@@ -274,7 +283,7 @@
|
||||
name = "square root circuit"
|
||||
desc = "This outputs the square root of a number you put in."
|
||||
icon_state = "square_root"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/square_root/do_work()
|
||||
@@ -284,9 +293,9 @@
|
||||
if(isnum(I.data))
|
||||
result = sqrt(I.data)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// % Modulo % //
|
||||
|
||||
@@ -294,17 +303,17 @@
|
||||
name = "modulo circuit"
|
||||
desc = "Gets the remainder of A / B."
|
||||
icon_state = "modulo"
|
||||
inputs = list("A", "B")
|
||||
inputs = list("\<NUM\> A", "\<NUM\> B")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/arithmetic/modulo/do_work()
|
||||
var/result = 0
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
var/datum/integrated_io/input/B = inputs[2]
|
||||
if(isnum(A.data) && isnum(B.data) && B.data != 0)
|
||||
result = A.data % B.data
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
var/B = get_pin_data(IC_INPUT, 2)
|
||||
if(isnum(A) && isnum(B) && B != 0)
|
||||
result = A % B
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
complexity = 2
|
||||
inputs = list("input")
|
||||
outputs = list("output")
|
||||
activators = list("convert")
|
||||
activators = list("\<PULSE IN\> convert", "\<PULSE OUT\> on convert")
|
||||
category_text = "Converter"
|
||||
autopulse = 1
|
||||
power_draw_per_use = 10
|
||||
@@ -16,89 +16,113 @@
|
||||
name = "number to string"
|
||||
desc = "This circuit can convert a number variable into a string."
|
||||
icon_state = "num-string"
|
||||
inputs = list("\<NUM\> input")
|
||||
outputs = list("\<TEXT\> output")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/num2text/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
if(incoming.data && isnum(incoming.data))
|
||||
result = num2text(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && isnum(incoming))
|
||||
result = num2text(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/text2num
|
||||
name = "string to number"
|
||||
desc = "This circuit can convert a string variable into a number."
|
||||
icon_state = "string-num"
|
||||
inputs = list("\<TEXT\> input")
|
||||
outputs = list("\<NUM\> output")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/text2num/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
if(incoming.data && istext(incoming.data))
|
||||
result = text2num(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && istext(incoming))
|
||||
result = text2num(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/ref2text
|
||||
name = "reference to string"
|
||||
desc = "This circuit can convert a reference to something else to a string, specifically the name of that reference."
|
||||
icon_state = "ref-string"
|
||||
inputs = list("\<REF\> input")
|
||||
outputs = list("\<TEXT\> output")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/ref2text/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
var/atom/A = incoming.data_as_type(/atom)
|
||||
result = A && A.name
|
||||
pull_data()
|
||||
var/atom/A = get_pin_data(IC_INPUT, 1)
|
||||
if(A && istype(A))
|
||||
result = A.name
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/lowercase
|
||||
name = "lowercase string converter"
|
||||
desc = "this will cause a string to come out in all lowercase."
|
||||
icon_state = "lowercase"
|
||||
inputs = list("\<TEXT\> input")
|
||||
outputs = list("\<TEXT\> output")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/lowercase/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
if(incoming.data && istext(incoming.data))
|
||||
result = lowertext(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && istext(incoming))
|
||||
result = lowertext(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/uppercase
|
||||
name = "uppercase string converter"
|
||||
desc = "THIS WILL CAUSE A STRING TO COME OUT IN ALL UPPERCASE."
|
||||
icon_state = "uppercase"
|
||||
inputs = list("\<TEXT\> input")
|
||||
outputs = list("\<TEXT\> output")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/uppercase/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
if(incoming.data && istext(incoming.data))
|
||||
result = uppertext(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && istext(incoming))
|
||||
result = uppertext(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/concatenatior
|
||||
name = "concatenatior"
|
||||
desc = "This joins many strings together to get one big string."
|
||||
desc = "This joins many strings or numbers together to get one big string."
|
||||
complexity = 4
|
||||
inputs = list("A","B","C","D","E","F","G","H")
|
||||
outputs = list("result")
|
||||
activators = list("concatenate")
|
||||
inputs = list(
|
||||
"\<TEXT/NUM\> A",
|
||||
"\<TEXT/NUM\> B",
|
||||
"\<TEXT/NUM\> C",
|
||||
"\<TEXT/NUM\> D",
|
||||
"\<TEXT/NUM\> E",
|
||||
"\<TEXT/NUM\> F",
|
||||
"\<TEXT/NUM\> G",
|
||||
"\<TEXT/NUM\> H"
|
||||
)
|
||||
outputs = list("\<TEXT\> result")
|
||||
activators = list("\<PULSE IN\> concatenate", "\<PULSE OUT\> on concatenated")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/concatenatior/do_work()
|
||||
@@ -107,70 +131,70 @@
|
||||
I.pull_data()
|
||||
if(istext(I.data))
|
||||
result = result + I.data
|
||||
else if(!isnull(I.data) && num2text(I.data))
|
||||
result = result + num2text(I.data)
|
||||
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/radians2degrees
|
||||
name = "radians to degrees converter"
|
||||
desc = "Converts radians to degrees."
|
||||
inputs = list("radian")
|
||||
outputs = list("degrees")
|
||||
inputs = list("\<NUM\> radian")
|
||||
outputs = list("\<NUM\> degrees")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/radians2degrees/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
incoming.pull_data()
|
||||
if(incoming.data && isnum(incoming.data))
|
||||
result = ToDegrees(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && isnum(incoming))
|
||||
result = ToDegrees(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/converter/degrees2radians
|
||||
name = "degrees to radians converter"
|
||||
desc = "Converts degrees to radians."
|
||||
inputs = list("degrees")
|
||||
outputs = list("radians")
|
||||
inputs = list("\<NUM\> degrees")
|
||||
outputs = list("\<NUM\> radians")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/degrees2radians/do_work()
|
||||
var/result = null
|
||||
var/datum/integrated_io/incoming = inputs[1]
|
||||
var/datum/integrated_io/outgoing = outputs[1]
|
||||
incoming.pull_data()
|
||||
if(incoming.data && isnum(incoming.data))
|
||||
result = ToRadians(incoming.data)
|
||||
pull_data()
|
||||
var/incoming = get_pin_data(IC_INPUT, 1)
|
||||
if(incoming && isnum(incoming))
|
||||
result = ToRadians(incoming)
|
||||
|
||||
outgoing.data = result
|
||||
outgoing.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/converter/abs_to_rel_coords
|
||||
name = "abs to rel coordinate converter"
|
||||
desc = "Easily convert absolute coordinates to relative coordinates with this."
|
||||
complexity = 4
|
||||
inputs = list("X1 (abs)", "Y1 (abs)", "X2 (abs)", "Y2 (abs)")
|
||||
outputs = list("X (rel)", "Y (rel)")
|
||||
activators = list("compute rel coordinates")
|
||||
inputs = list("\<NUM\> X1", "\<NUM\> Y1", "\<NUM\> X2", "\<NUM\> Y2")
|
||||
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
||||
activators = list("\<PULSE IN\> compute rel coordinates", "\<PULSE OUT\> on convert")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/converter/abs_to_rel_coords/do_work()
|
||||
var/datum/integrated_io/x1 = inputs[1]
|
||||
var/datum/integrated_io/y1 = inputs[2]
|
||||
var/x1 = get_pin_data(IC_INPUT, 1)
|
||||
var/y1 = get_pin_data(IC_INPUT, 2)
|
||||
|
||||
var/datum/integrated_io/x2 = inputs[3]
|
||||
var/datum/integrated_io/y2 = inputs[4]
|
||||
var/x2 = get_pin_data(IC_INPUT, 3)
|
||||
var/y2 = get_pin_data(IC_INPUT, 4)
|
||||
|
||||
var/datum/integrated_io/result_x = outputs[1]
|
||||
var/datum/integrated_io/result_y = outputs[2]
|
||||
if(x1 && y1 && x2 && y2)
|
||||
set_pin_data(IC_OUTPUT, 1, x1 - x2)
|
||||
set_pin_data(IC_OUTPUT, 2, y1 - y2)
|
||||
|
||||
if(x1.data && y1.data && x2.data && y2.data)
|
||||
result_x.data = x1.data - x2.data
|
||||
result_y.data = y1.data - y2.data
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
@@ -14,28 +14,27 @@
|
||||
can_be_asked_input = 1
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("on pressed")
|
||||
activators = list("\<PULSE OUT\> on pressed")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
|
||||
var/datum/integrated_io/A = activators[1]
|
||||
if(A.linked.len)
|
||||
for(var/datum/integrated_io/activate/target in A.linked)
|
||||
target.holder.check_then_do_work()
|
||||
to_chat(user, "<span class='notice'>You press the button labeled '[src.name]'.</span>")
|
||||
activate_pin(1)
|
||||
|
||||
/obj/item/integrated_circuit/input/toggle_button
|
||||
name = "toggle button"
|
||||
desc = "It toggles on, off, on, off..."
|
||||
icon_state = "toggle_button"
|
||||
complexity = 1
|
||||
can_be_asked_input = 1
|
||||
inputs = list()
|
||||
outputs = list("on" = 0)
|
||||
activators = list("on toggle")
|
||||
outputs = list("\<NUM\> on" = 0)
|
||||
activators = list("\<PULSE OUT\> on toggle")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/input/toggle_button/ask_for_input(mob/user) // Ditto.
|
||||
set_pin_data(IC_OUTPUT, 1, !get_pin_data(IC_OUTPUT, 1))
|
||||
push_data()
|
||||
activate_pin(1)
|
||||
to_chat(user, "<span class='notice'>You toggle the button labeled '[src.name]' [get_pin_data(IC_OUTPUT, 1) ? "on" : "off"].</span>")
|
||||
|
||||
@@ -46,19 +45,17 @@
|
||||
complexity = 2
|
||||
can_be_asked_input = 1
|
||||
inputs = list()
|
||||
outputs = list("number entered")
|
||||
activators = list("on entered")
|
||||
outputs = list("\<NUM\> number entered")
|
||||
activators = list("\<PULSE OUT\> on entered")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 4
|
||||
|
||||
/obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user)
|
||||
var/new_input = input(user, "Enter a number, please.","Number pad") as null|num
|
||||
if(isnum(new_input) && CanInteract(user, physical_state))
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = new_input
|
||||
O.push_data()
|
||||
var/datum/integrated_io/A = activators[1]
|
||||
A.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, new_input)
|
||||
push_data()
|
||||
activate_pin(1)
|
||||
|
||||
/obj/item/integrated_circuit/input/textpad
|
||||
name = "text pad"
|
||||
@@ -67,49 +64,43 @@
|
||||
complexity = 2
|
||||
can_be_asked_input = 1
|
||||
inputs = list()
|
||||
outputs = list("string entered")
|
||||
activators = list("on entered")
|
||||
outputs = list("\<TEXT\> string entered")
|
||||
activators = list("\<PULSE OUT\> on entered")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 4
|
||||
|
||||
/obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user)
|
||||
var/new_input = input(user, "Enter some words, please.","Number pad") as null|text
|
||||
if(istext(new_input) && CanInteract(user, physical_state))
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = new_input
|
||||
O.push_data()
|
||||
var/datum/integrated_io/A = activators[1]
|
||||
A.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, new_input)
|
||||
push_data()
|
||||
activate_pin(1)
|
||||
|
||||
/obj/item/integrated_circuit/input/med_scanner
|
||||
name = "integrated medical analyser"
|
||||
desc = "A very small version of the common medical analyser. This allows the machine to know how healthy someone is."
|
||||
icon_state = "medscan"
|
||||
complexity = 4
|
||||
inputs = list("target ref")
|
||||
outputs = list("total health %", "total missing health")
|
||||
activators = list("scan")
|
||||
inputs = list("\<REF\> target")
|
||||
outputs = list("\<NUM\> total health %", "\<NUM\> total missing health")
|
||||
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
power_draw_per_use = 40
|
||||
|
||||
/obj/item/integrated_circuit/input/med_scanner/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human)
|
||||
var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human)
|
||||
if(!istype(H)) //Invalid input
|
||||
return
|
||||
if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
|
||||
var/total_health = round(H.health/H.maxHealth, 0.1)*100
|
||||
var/missing_health = H.maxHealth - H.health
|
||||
var/total_health = round(H.health/H.getMaxHealth(), 0.1)*100
|
||||
var/missing_health = H.getMaxHealth() - H.health
|
||||
|
||||
var/datum/integrated_io/total = outputs[1]
|
||||
var/datum/integrated_io/missing = outputs[2]
|
||||
set_pin_data(IC_OUTPUT, 1, total_health)
|
||||
set_pin_data(IC_OUTPUT, 2, missing_health)
|
||||
|
||||
total.data = total_health
|
||||
missing.data = missing_health
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/input/adv_med_scanner
|
||||
name = "integrated advanced medical analyser"
|
||||
@@ -117,48 +108,39 @@
|
||||
This type is much more precise, allowing the machine to know much more about the target than a normal analyzer."
|
||||
icon_state = "medscan_adv"
|
||||
complexity = 12
|
||||
inputs = list("target ref")
|
||||
inputs = list("\<REF\> target")
|
||||
outputs = list(
|
||||
"total health %",
|
||||
"total missing health",
|
||||
"brute damage",
|
||||
"burn damage",
|
||||
"tox damage",
|
||||
"oxy damage",
|
||||
"clone damage"
|
||||
"\<NUM\> total health %",
|
||||
"\<NUM\> total missing health",
|
||||
"\<NUM\> brute damage",
|
||||
"\<NUM\> burn damage",
|
||||
"\<NUM\> tox damage",
|
||||
"\<NUM\> oxy damage",
|
||||
"\<NUM\> clone damage"
|
||||
)
|
||||
activators = list("scan")
|
||||
activators = list("\<PULSE IN\> scan", "\<PULSE OUT\> on scanned")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_BIO = 4)
|
||||
power_draw_per_use = 80
|
||||
|
||||
/obj/item/integrated_circuit/input/adv_med_scanner/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human)
|
||||
var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human)
|
||||
if(!istype(H)) //Invalid input
|
||||
return
|
||||
if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range.
|
||||
var/total_health = round(H.health/H.maxHealth, 0.1)*100
|
||||
var/missing_health = H.maxHealth - H.health
|
||||
var/total_health = round(H.health/H.getMaxHealth(), 0.1)*100
|
||||
var/missing_health = H.getMaxHealth() - H.health
|
||||
|
||||
var/datum/integrated_io/total = outputs[1]
|
||||
var/datum/integrated_io/missing = outputs[2]
|
||||
var/datum/integrated_io/brute = outputs[3]
|
||||
var/datum/integrated_io/burn = outputs[4]
|
||||
var/datum/integrated_io/tox = outputs[5]
|
||||
var/datum/integrated_io/oxy = outputs[6]
|
||||
var/datum/integrated_io/clone = outputs[7]
|
||||
set_pin_data(IC_OUTPUT, 1, total_health)
|
||||
set_pin_data(IC_OUTPUT, 2, missing_health)
|
||||
set_pin_data(IC_OUTPUT, 3, H.getBruteLoss())
|
||||
set_pin_data(IC_OUTPUT, 4, H.getFireLoss())
|
||||
set_pin_data(IC_OUTPUT, 5, H.getToxLoss())
|
||||
set_pin_data(IC_OUTPUT, 6, H.getOxyLoss())
|
||||
set_pin_data(IC_OUTPUT, 7, H.getCloneLoss())
|
||||
|
||||
total.data = total_health
|
||||
missing.data = missing_health
|
||||
brute.data = H.getBruteLoss()
|
||||
burn.data = H.getFireLoss()
|
||||
tox.data = H.getToxLoss()
|
||||
oxy.data = H.getOxyLoss()
|
||||
clone.data = H.getCloneLoss()
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/input/local_locator
|
||||
name = "local locator"
|
||||
@@ -222,9 +204,9 @@
|
||||
Meaning the default frequency is expressed as 1457, not 145.7. To send a signal, pulse the 'send signal' activator pin."
|
||||
icon_state = "signal"
|
||||
complexity = 4
|
||||
inputs = list("frequency","code")
|
||||
inputs = list("\<NUM\> frequency","\<NUM\> code")
|
||||
outputs = list()
|
||||
activators = list("send signal","on signal received")
|
||||
activators = list("\<PULSE IN\> send signal","\<PULSE OUT\> on signal sent", "\<PULSE OUT\> on signal received")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2)
|
||||
power_draw_idle = 5
|
||||
@@ -237,11 +219,9 @@
|
||||
/obj/item/integrated_circuit/input/signaler/initialize()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
var/datum/integrated_io/new_freq = inputs[1]
|
||||
var/datum/integrated_io/new_code = inputs[2]
|
||||
// Set the pins so when someone sees them, they won't show as null
|
||||
new_freq.data = frequency
|
||||
new_code.data = code
|
||||
set_pin_data(IC_INPUT, 1, frequency)
|
||||
set_pin_data(IC_INPUT, 2, code)
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
@@ -250,12 +230,12 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/on_data_written()
|
||||
var/datum/integrated_io/new_freq = inputs[1]
|
||||
var/datum/integrated_io/new_code = inputs[2]
|
||||
if(isnum(new_freq.data) && new_freq.data > 0)
|
||||
set_frequency(new_freq.data)
|
||||
if(isnum(new_code.data))
|
||||
code = new_code.data
|
||||
var/new_freq = get_pin_data(IC_INPUT, 1)
|
||||
var/new_code = get_pin_data(IC_INPUT, 2)
|
||||
if(isnum(new_freq) && new_freq > 0)
|
||||
set_frequency(new_freq)
|
||||
if(isnum(new_code))
|
||||
code = new_code
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/do_work() // Sends a signal.
|
||||
@@ -267,6 +247,7 @@
|
||||
signal.encryption = code
|
||||
signal.data["message"] = "ACTIVATE"
|
||||
radio_connection.post_signal(src, signal)
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/proc/set_frequency(new_frequency)
|
||||
if(!frequency)
|
||||
@@ -280,11 +261,11 @@
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/integrated_circuit/input/signaler/receive_signal(datum/signal/signal)
|
||||
var/datum/integrated_io/new_code = inputs[2]
|
||||
var/new_code = get_pin_data(IC_INPUT, 2)
|
||||
var/code = 0
|
||||
|
||||
if(isnum(new_code.data))
|
||||
code = new_code.data
|
||||
if(isnum(new_code))
|
||||
code = new_code
|
||||
if(!signal)
|
||||
return 0
|
||||
if(signal.encryption != code)
|
||||
@@ -292,8 +273,7 @@
|
||||
if(signal.source == src) // Don't trigger ourselves.
|
||||
return 0
|
||||
|
||||
var/datum/integrated_io/A = activators[2]
|
||||
A.push_data()
|
||||
activate_pin(3)
|
||||
|
||||
for(var/mob/O in hearers(1, get_turf(src)))
|
||||
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
|
||||
@@ -306,9 +286,9 @@
|
||||
will pulse whatever's connected to it. Pulsing the first activation pin will send a message."
|
||||
icon_state = "signal"
|
||||
complexity = 4
|
||||
inputs = list("target EPv2 address", "data to send", "secondary text")
|
||||
outputs = list("address received", "data received", "secondary text received")
|
||||
activators = list("send data", "on data received")
|
||||
inputs = list("\<TEXT\> target EPv2 address", "\<TEXT\> data to send", "\<TEXT\> secondary text")
|
||||
outputs = list("\<TEXT\> address received", "\<TEXT\> data received", "\<TEXT\> secondary text received")
|
||||
activators = list("\<PULSE IN\> send data", "\<PULSE OUT\> on data received")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2)
|
||||
power_draw_per_use = 50
|
||||
@@ -318,7 +298,7 @@
|
||||
..()
|
||||
exonet = new(src)
|
||||
exonet.make_address("EPv2_circuit-\ref[src]")
|
||||
desc += "<br>This circuit's EPv2 address is: [exonet.address]."
|
||||
desc += "<br>This circuit's EPv2 address is: [exonet.address]"
|
||||
|
||||
/obj/item/integrated_circuit/input/EPv2/Destroy()
|
||||
if(exonet)
|
||||
@@ -327,64 +307,60 @@
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/input/EPv2/do_work()
|
||||
var/datum/integrated_io/target_address = inputs[1]
|
||||
var/datum/integrated_io/message = inputs[2]
|
||||
var/datum/integrated_io/text = inputs[3]
|
||||
if(istext(target_address.data))
|
||||
exonet.send_message(target_address.data, message.data, text.data)
|
||||
var/target_address = get_pin_data(IC_INPUT, 1)
|
||||
var/message = get_pin_data(IC_INPUT, 2)
|
||||
var/text = get_pin_data(IC_INPUT, 3)
|
||||
|
||||
if(target_address && istext(target_address))
|
||||
exonet.send_message(target_address, message, text)
|
||||
|
||||
/obj/item/integrated_circuit/input/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message, var/text)
|
||||
var/datum/integrated_io/message_received = outputs[1]
|
||||
var/datum/integrated_io/data_received = outputs[2]
|
||||
var/datum/integrated_io/text_received = outputs[3]
|
||||
set_pin_data(IC_OUTPUT, 1, origin_address)
|
||||
set_pin_data(IC_OUTPUT, 2, message)
|
||||
set_pin_data(IC_OUTPUT, 3, text)
|
||||
|
||||
var/datum/integrated_io/A = activators[2]
|
||||
A.push_data()
|
||||
|
||||
message_received.write_data_to_pin(origin_address)
|
||||
data_received.write_data_to_pin(message)
|
||||
text_received.write_data_to_pin(text)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
//This circuit gives information on where the machine is.
|
||||
/obj/item/integrated_circuit/input/gps
|
||||
name = "global positioning system"
|
||||
desc = "This allows you to easily know the position of a machine containing this device."
|
||||
extended_desc = "The GPS's coordinates it gives is absolute, not relative."
|
||||
icon_state = "gps"
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list("X (abs)", "Y (abs)")
|
||||
activators = list("get coordinates")
|
||||
outputs = list("\<NUM\> X", "\<NUM\> Y")
|
||||
activators = list("\<PULSE IN\> get coordinates", "\<PULSE OUT\> on get coordinates")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 30
|
||||
|
||||
/obj/item/integrated_circuit/input/gps/do_work()
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/integrated_io/result_x = outputs[1]
|
||||
var/datum/integrated_io/result_y = outputs[2]
|
||||
|
||||
result_x.data = null
|
||||
result_y.data = null
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
set_pin_data(IC_OUTPUT, 2, null)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
result_x.data = T.x
|
||||
result_y.data = T.y
|
||||
set_pin_data(IC_OUTPUT, 1, T.x)
|
||||
set_pin_data(IC_OUTPUT, 2, T.y)
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone
|
||||
name = "microphone"
|
||||
desc = "Useful for spying on people or for voice activated machines."
|
||||
extended_desc = "This will automatically translate most languages it hears to Galactic Common. \
|
||||
The first activation pin is always pulsed when the circuit hears someone talk, while the second one \
|
||||
is only triggered if it hears someone speaking a language other than Galactic Common."
|
||||
icon_state = "recorder"
|
||||
complexity = 8
|
||||
inputs = list()
|
||||
outputs = list("speaker \<String\>", "message \<String\>")
|
||||
activators = list("on message received")
|
||||
outputs = list("\<TEXT\> speaker", "\<TEXT\> message")
|
||||
activators = list("\<PULSE OUT\> on message received", "\<PULSE OUT\> on translation")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 15
|
||||
|
||||
@@ -397,42 +373,45 @@
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/input/microphone/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)
|
||||
var/datum/integrated_io/V = outputs[1]
|
||||
var/datum/integrated_io/O = outputs[2]
|
||||
var/datum/integrated_io/A = activators[1]
|
||||
var/translated = FALSE
|
||||
if(M && msg)
|
||||
if(speaking)
|
||||
if(!speaking.machine_understands)
|
||||
msg = speaking.scramble(msg)
|
||||
V.data = M.GetVoice()
|
||||
O.data = msg
|
||||
A.push_data()
|
||||
if(!istype(speaking, /datum/language/common))
|
||||
translated = TRUE
|
||||
set_pin_data(IC_OUTPUT, 1, M.GetVoice())
|
||||
set_pin_data(IC_OUTPUT, 2, msg)
|
||||
|
||||
for(var/datum/integrated_io/output/out in outputs)
|
||||
out.push_data()
|
||||
|
||||
A.push_data()
|
||||
push_data()
|
||||
activate_pin(1)
|
||||
if(translated)
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
|
||||
/obj/item/integrated_circuit/input/sensor
|
||||
name = "sensor"
|
||||
desc = "Scans and obtains a reference for any objects or persons near you. All you need to do is shove the machine in their face."
|
||||
extended_desc = "If 'ignore storage' pin is set to 1, the sensor will disregard scanning various storage containers such as backpacks."
|
||||
icon_state = "recorder"
|
||||
complexity = 12
|
||||
inputs = list()
|
||||
outputs = list("scanned ref \<Ref\>")
|
||||
activators = list("on scanned")
|
||||
inputs = list("\<NUM\> ignore storage" = 1)
|
||||
outputs = list("\<REF\> scanned")
|
||||
activators = list("\<PULSE OUT\> on scanned")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 120
|
||||
|
||||
/obj/item/integrated_circuit/input/sensor/do_work()
|
||||
// Because this gets called by attack(), all this needs to do is pulse the activator.
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
var/datum/integrated_io/activate/A = activators[1]
|
||||
A.push_data()
|
||||
/obj/item/integrated_circuit/input/sensor/proc/scan(var/atom/A)
|
||||
var/ignore_bags = get_pin_data(IC_INPUT, 1)
|
||||
if(ignore_bags)
|
||||
if(istype(A, /obj/item/weapon/storage))
|
||||
return FALSE
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, weakref(A))
|
||||
push_data()
|
||||
activate_pin(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/integrated_circuit/output
|
||||
category_text = "Output"
|
||||
@@ -441,9 +420,9 @@
|
||||
name = "small screen"
|
||||
desc = "This small screen can display a single piece of data, when the machine is examined closely."
|
||||
icon_state = "screen"
|
||||
inputs = list("displayed data")
|
||||
inputs = list("\<TEXT/NUM\> displayed data")
|
||||
outputs = list()
|
||||
activators = list("load data")
|
||||
activators = list("\<PULSE IN\> load data")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 10
|
||||
autopulse = 1
|
||||
@@ -497,7 +476,7 @@
|
||||
complexity = 4
|
||||
inputs = list()
|
||||
outputs = list()
|
||||
activators = list("toggle light")
|
||||
activators = list("\<PULSE IN\> toggle light")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
var/light_toggled = 0
|
||||
var/light_brightness = 3
|
||||
@@ -519,18 +498,18 @@
|
||||
power_draw_idle = light_toggled ? light_brightness * 2 : 0
|
||||
|
||||
/obj/item/integrated_circuit/output/light/advanced/update_lighting()
|
||||
var/datum/integrated_io/R = inputs[1]
|
||||
var/datum/integrated_io/G = inputs[2]
|
||||
var/datum/integrated_io/B = inputs[3]
|
||||
var/datum/integrated_io/brightness = inputs[4]
|
||||
var/R = get_pin_data(IC_INPUT, 1)
|
||||
var/G = get_pin_data(IC_INPUT, 2)
|
||||
var/B = get_pin_data(IC_INPUT, 3)
|
||||
var/brightness = get_pin_data(IC_INPUT, 4)
|
||||
|
||||
if(isnum(R.data) && isnum(G.data) && isnum(B.data) && isnum(brightness.data))
|
||||
R.data = Clamp(R.data, 0, 255)
|
||||
G.data = Clamp(G.data, 0, 255)
|
||||
B.data = Clamp(B.data, 0, 255)
|
||||
brightness.data = Clamp(brightness.data, 0, 6)
|
||||
light_rgb = rgb(R.data, G.data, B.data)
|
||||
light_brightness = brightness.data
|
||||
if(isnum(R) && isnum(G) && isnum(B) && isnum(brightness))
|
||||
R = Clamp(R, 0, 255)
|
||||
G = Clamp(G, 0, 255)
|
||||
B = Clamp(B, 0, 255)
|
||||
brightness = Clamp(brightness, 0, 6)
|
||||
light_rgb = rgb(R, G, B)
|
||||
light_brightness = brightness
|
||||
|
||||
..()
|
||||
|
||||
@@ -544,10 +523,10 @@
|
||||
icon_state = "light_adv"
|
||||
complexity = 8
|
||||
inputs = list(
|
||||
"R",
|
||||
"G",
|
||||
"B",
|
||||
"Brightness"
|
||||
"\<NUM\> R",
|
||||
"\<NUM\> G",
|
||||
"\<NUM\> B",
|
||||
"\<NUM\> Brightness"
|
||||
)
|
||||
outputs = list()
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
@@ -563,9 +542,9 @@
|
||||
complexity = 8
|
||||
cooldown_per_use = 4 SECONDS
|
||||
inputs = list(
|
||||
"sound ID",
|
||||
"volume",
|
||||
"frequency"
|
||||
"\<TEXT\> sound ID",
|
||||
"\<NUM\> volume",
|
||||
"\<NUM\> frequency"
|
||||
)
|
||||
outputs = list()
|
||||
activators = list("play sound")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE."
|
||||
complexity = 3
|
||||
outputs = list("result")
|
||||
activators = list("compare", "on true result", "on false result")
|
||||
activators = list("\<PULSE IN\> compare", "\<PULSE OUT\> on true result", "\<PULSE OUT\> on false result")
|
||||
category_text = "Logic"
|
||||
autopulse = 1
|
||||
power_draw_per_use = 1
|
||||
@@ -14,19 +14,17 @@
|
||||
check_then_do_work()
|
||||
|
||||
/obj/item/integrated_circuit/logic/do_work()
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
var/datum/integrated_io/T = activators[2]
|
||||
var/datum/integrated_io/F = activators[3]
|
||||
O.push_data()
|
||||
if(O.data)
|
||||
T.push_data()
|
||||
push_data()
|
||||
if(get_pin_data(IC_INPUT, 1))
|
||||
activate_pin(1)
|
||||
else
|
||||
F.push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary
|
||||
inputs = list("A","B")
|
||||
inputs = list("\<ANY\> A","\<ANY\> B")
|
||||
|
||||
/obj/item/integrated_circuit/logic/binary/do_work()
|
||||
pull_data()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
var/datum/integrated_io/B = inputs[2]
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
@@ -37,9 +35,10 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/integrated_circuit/logic/unary
|
||||
inputs = list("A")
|
||||
inputs = list("\<ANY\> A")
|
||||
|
||||
/obj/item/integrated_circuit/logic/unary/do_work()
|
||||
pull_data()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = do_check(A) ? TRUE : FALSE
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
complexity = 20
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
inputs = list(
|
||||
"target X rel",
|
||||
"target Y rel"
|
||||
"\<NUM\> target X rel",
|
||||
"\<NUM\> target Y rel"
|
||||
)
|
||||
outputs = list()
|
||||
activators = list(
|
||||
"fire"
|
||||
"\<PULSE IN\> fire"
|
||||
)
|
||||
var/obj/item/weapon/gun/installed_gun = null
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
some power is lost due to ineffiency."
|
||||
w_class = ITEMSIZE_SMALL
|
||||
complexity = 16
|
||||
inputs = list("target ref")
|
||||
outputs = list("target cell charge", "target cell max charge", "target cell percentage")
|
||||
activators = list("transmit")
|
||||
inputs = list("\<REF\> target")
|
||||
outputs = list("\<NUM\> target cell charge", "\<NUM\> target cell max charge", "\<NUM\> target cell percentage")
|
||||
activators = list("\<PULSE IN\> transmit")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 4, TECH_POWER = 4, TECH_MAGNET = 3)
|
||||
power_draw_per_use = 500 // Inefficency has to come from somewhere.
|
||||
|
||||
@@ -43,39 +43,39 @@
|
||||
flags = OPENCONTAINER
|
||||
complexity = 20
|
||||
cooldown_per_use = 6 SECONDS
|
||||
inputs = list("target ref", "injection amount" = 5)
|
||||
inputs = list("\<REF\> target", "\<NUM\> injection amount" = 5)
|
||||
outputs = list()
|
||||
activators = list("inject")
|
||||
activators = list("\<PULSE IN\> inject")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
volume = 30
|
||||
power_draw_per_use = 15
|
||||
|
||||
/obj/item/integrated_circuit/reagent/injector/proc/inject_amount()
|
||||
var/datum/integrated_io/amount = inputs[2]
|
||||
if(isnum(amount.data))
|
||||
return Clamp(amount.data, 0, 30)
|
||||
var/amount = get_pin_data(IC_INPUT, 2)
|
||||
if(isnum(amount))
|
||||
return Clamp(amount, 0, 30)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/injector/do_work()
|
||||
set waitfor = 0 // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing
|
||||
|
||||
var/datum/integrated_io/target = inputs[1]
|
||||
var/atom/movable/AM = target.data_as_type(/atom/movable)
|
||||
var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
|
||||
if(!istype(AM)) //Invalid input
|
||||
return
|
||||
if(!reagents.total_volume) // Empty
|
||||
return
|
||||
if(AM.can_be_injected_by(src))
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
var/turf/T = get_turf(AM)
|
||||
T.visible_message("<span class='warning'>[src] is trying to inject [AM]!</span>")
|
||||
T.visible_message("<span class='warning'>[src] is trying to inject [L]!</span>")
|
||||
sleep(3 SECONDS)
|
||||
if(!AM.can_be_injected_by(src))
|
||||
if(!L.can_be_injected_by(src))
|
||||
return
|
||||
var/contained = reagents.get_reagents()
|
||||
var/trans = reagents.trans_to_mob(target, inject_amount(), CHEM_BLOOD)
|
||||
log_debug("[src] injected \the [AM] with [trans]u of [contained].") //VOREStation Edit - I don't care THAT much.
|
||||
var/trans = reagents.trans_to_mob(L, inject_amount(), CHEM_BLOOD)
|
||||
message_admins("[src] injected \the [L] with [trans]u of [contained].")
|
||||
to_chat(AM, "<span class='notice'>You feel a tiny prick!</span>")
|
||||
visible_message("<span class='warning'>[src] injects [AM]!</span>")
|
||||
visible_message("<span class='warning'>[src] injects [L]!</span>")
|
||||
else
|
||||
reagents.trans_to(AM, inject_amount())
|
||||
|
||||
@@ -88,9 +88,9 @@
|
||||
outside the machine if it is next to the machine. Note that this cannot be used on entities."
|
||||
flags = OPENCONTAINER
|
||||
complexity = 8
|
||||
inputs = list("source ref", "target ref", "injection amount" = 10)
|
||||
inputs = list("\<REF\> source", "\<REF\> target", "\<NUM\> injection amount" = 10)
|
||||
outputs = list()
|
||||
activators = list("transfer reagents")
|
||||
activators = list("\<PULSE IN\> transfer reagents", "\<PULSE OUT\> on transfer")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
var/transfer_amount = 10
|
||||
@@ -103,10 +103,9 @@
|
||||
transfer_amount = amount.data
|
||||
|
||||
/obj/item/integrated_circuit/reagent/pump/do_work()
|
||||
var/datum/integrated_io/A = inputs[1]
|
||||
var/datum/integrated_io/B = inputs[2]
|
||||
var/atom/movable/source = A.data_as_type(/atom/movable)
|
||||
var/atom/movable/target = B.data_as_type(/atom/movable)
|
||||
var/atom/movable/source = get_pin_data_as_type(IC_INPUT, 1, /atom/movable)
|
||||
var/atom/movable/target = get_pin_data_as_type(IC_INPUT, 2, /atom/movable)
|
||||
|
||||
if(!istype(source) || !istype(target)) //Invalid input
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -117,10 +116,11 @@
|
||||
return
|
||||
if(!source.is_open_container() || !target.is_open_container())
|
||||
return
|
||||
if(!source.reagents.get_free_space() || !target.reagents.get_free_space())
|
||||
if(!target.reagents.get_free_space())
|
||||
return
|
||||
|
||||
source.reagents.trans_to(target, transfer_amount)
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/reagent/storage
|
||||
name = "reagent storage"
|
||||
|
||||
@@ -8,17 +8,16 @@
|
||||
cannot see the target, it will not be able to calculate the correct direction."
|
||||
icon_state = "numberpad"
|
||||
complexity = 25
|
||||
inputs = list("target ref")
|
||||
outputs = list("dir")
|
||||
activators = list("calculate dir")
|
||||
inputs = list("\<REF\> target")
|
||||
outputs = list("\<NUM\> dir")
|
||||
activators = list("\<PULSE IN\> calculate dir", "\<PULSE OUT\> on calculated")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_DATA = 5)
|
||||
power_draw_per_use = 40
|
||||
|
||||
/obj/item/integrated_circuit/smart/basic_pathfinder/do_work()
|
||||
var/datum/integrated_io/I = inputs[1]
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = null
|
||||
set_pin_data(IC_OUTPUT, 1, null)
|
||||
|
||||
if(!isweakref(I.data))
|
||||
return
|
||||
@@ -28,6 +27,6 @@
|
||||
if(!(A in view(get_turf(src))))
|
||||
return // Can't see the target.
|
||||
var/desired_dir = get_dir(get_turf(src), A)
|
||||
if(desired_dir)
|
||||
O.data = desired_dir
|
||||
O.push_data()
|
||||
|
||||
set_pin_data(IC_OUTPUT, 1, desired_dir)
|
||||
push_data()
|
||||
@@ -12,16 +12,15 @@
|
||||
This circuit is set to send a pulse after a delay of two seconds."
|
||||
icon_state = "delay-20"
|
||||
var/delay = 2 SECONDS
|
||||
activators = list("incoming pulse","outgoing pulse")
|
||||
activators = list("\<PULSE IN\> incoming","\<PULSE OUT\> outgoing")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 2
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/do_work()
|
||||
set waitfor = 0 // Don't sleep in a proc that is called by a processor. It'll delay the entire thing
|
||||
|
||||
var/datum/integrated_io/out_pulse = activators[2]
|
||||
sleep(delay)
|
||||
out_pulse.push_data()
|
||||
activate_pin(2)
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/five_sec
|
||||
name = "five-sec delay circuit"
|
||||
@@ -60,14 +59,13 @@
|
||||
desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \
|
||||
This circuit's delay can be customized, between 1/10th of a second to one hour. The delay is updated upon receiving a pulse."
|
||||
icon_state = "delay"
|
||||
inputs = list("delay time")
|
||||
inputs = list("\<NUM\> delay time")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/time/delay/custom/do_work()
|
||||
var/datum/integrated_io/delay_input = inputs[1]
|
||||
if(delay_input.data && isnum(delay_input.data) )
|
||||
var/new_delay = min(delay_input.data, 1)
|
||||
new_delay = max(new_delay, 36000) //An hour.
|
||||
var/delay_input = get_pin_data(IC_INPUT, 1)
|
||||
if(delay_input && isnum(delay_input) )
|
||||
var/new_delay = between(1, delay_input, 36000) //An hour.
|
||||
delay = new_delay
|
||||
|
||||
..()
|
||||
@@ -80,8 +78,8 @@
|
||||
var/ticks_to_pulse = 4
|
||||
var/ticks_completed = 0
|
||||
var/is_running = FALSE
|
||||
inputs = list("enable ticking")
|
||||
activators = list("outgoing pulse")
|
||||
inputs = list("\<NUM\> enable ticking" = 0)
|
||||
activators = list("\<PULSE OUT\> outgoing pulse")
|
||||
spawn_flags = IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 4
|
||||
|
||||
@@ -91,8 +89,8 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/integrated_circuit/time/ticker/on_data_written()
|
||||
var/datum/integrated_io/do_tick = inputs[1]
|
||||
if(do_tick.data && !is_running)
|
||||
var/do_tick = get_pin_data(IC_INPUT, 1)
|
||||
if(do_tick && !is_running)
|
||||
is_running = TRUE
|
||||
processing_objects |= src
|
||||
else if(is_running)
|
||||
@@ -108,8 +106,7 @@
|
||||
ticks_completed -= ticks_to_pulse
|
||||
else
|
||||
ticks_completed = 0
|
||||
var/datum/integrated_io/pulser = activators[1]
|
||||
pulser.push_data()
|
||||
activate_pin(1)
|
||||
|
||||
/obj/item/integrated_circuit/time/ticker/fast
|
||||
name = "fast ticker"
|
||||
@@ -134,20 +131,16 @@
|
||||
desc = "Tells you what the local time is, specific to your station or planet."
|
||||
icon_state = "clock"
|
||||
inputs = list()
|
||||
outputs = list("time (string)", "hours (number)", "minutes (number)", "seconds (number)")
|
||||
outputs = list("\<TEXT\> time", "\<NUM\> hours", "\<NUM\> minutes", "\<NUM\> seconds")
|
||||
activators = list("\<PULSE IN\> get time","\<PULSE OUT\> on time got")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
power_draw_per_use = 4
|
||||
|
||||
/obj/item/integrated_circuit/time/clock/do_work()
|
||||
var/datum/integrated_io/time = outputs[1]
|
||||
var/datum/integrated_io/hour = outputs[2]
|
||||
var/datum/integrated_io/min = outputs[3]
|
||||
var/datum/integrated_io/sec = outputs[4]
|
||||
set_pin_data(IC_OUTPUT, 1, time2text(station_time_in_ticks, "hh:mm:ss") )
|
||||
set_pin_data(IC_OUTPUT, 2, text2num(time2text(station_time_in_ticks, "hh") ) )
|
||||
set_pin_data(IC_OUTPUT, 3, text2num(time2text(station_time_in_ticks, "mm") ) )
|
||||
set_pin_data(IC_OUTPUT, 4, text2num(time2text(station_time_in_ticks, "ss") ) )
|
||||
|
||||
time.data = time2text(station_time_in_ticks, "hh:mm:ss")
|
||||
hour.data = text2num(time2text(station_time_in_ticks, "hh"))
|
||||
min.data = text2num(time2text(station_time_in_ticks, "mm"))
|
||||
sec.data = text2num(time2text(station_time_in_ticks, "ss"))
|
||||
|
||||
for(var/datum/integrated_io/output/O in outputs)
|
||||
O.push_data()
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
@@ -1,9 +1,18 @@
|
||||
//These circuits do not-so-simple math.
|
||||
/obj/item/integrated_circuit/trig
|
||||
complexity = 1
|
||||
inputs = list("A","B","C","D","E","F","G","H")
|
||||
outputs = list("result")
|
||||
activators = list("compute")
|
||||
inputs = list(
|
||||
"\<NUM\> A",
|
||||
"\<NUM\> B",
|
||||
"\<NUM\> C",
|
||||
"\<NUM\> D",
|
||||
"\<NUM\> E",
|
||||
"\<NUM\> F",
|
||||
"\<NUM\> G",
|
||||
"\<NUM\> H"
|
||||
)
|
||||
outputs = list("\<NUM\> result")
|
||||
activators = list("\<PULSE IN\> compute", "\<PULSE OUT\> on computed")
|
||||
category_text = "Trig"
|
||||
extended_desc = "Input and output are in degrees."
|
||||
autopulse = 1
|
||||
@@ -19,19 +28,19 @@
|
||||
name = "sin circuit"
|
||||
desc = "Has nothing to do with evil, unless you consider trigonometry to be evil. Outputs the sine of A."
|
||||
icon_state = "sine"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/sine/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = sin(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = sin(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Cosine //
|
||||
|
||||
@@ -39,19 +48,19 @@
|
||||
name = "cos circuit"
|
||||
desc = "Outputs the cosine of A."
|
||||
icon_state = "cosine"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/cosine/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = cos(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = cos(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Tangent //
|
||||
|
||||
@@ -59,19 +68,19 @@
|
||||
name = "tan circuit"
|
||||
desc = "Outputs the tangent of A. Guaranteed to not go on a tangent about its existance."
|
||||
icon_state = "tangent"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/tangent/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = Tan(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = Tan(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
// Cosecant //
|
||||
|
||||
@@ -79,19 +88,19 @@
|
||||
name = "csc circuit"
|
||||
desc = "Outputs the cosecant of A."
|
||||
icon_state = "cosecant"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/cosecant/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = Csc(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = Csc(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
// Secant //
|
||||
@@ -100,19 +109,19 @@
|
||||
name = "sec circuit"
|
||||
desc = "Outputs the secant of A. Has nothing to do with the security department."
|
||||
icon_state = "secant"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/secant/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = Sec(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = Sec(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
|
||||
|
||||
// Cotangent //
|
||||
@@ -121,16 +130,16 @@
|
||||
name = "cot circuit"
|
||||
desc = "Outputs the cotangent of A."
|
||||
icon_state = "cotangent"
|
||||
inputs = list("A")
|
||||
inputs = list("\<NUM\> A")
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
|
||||
/obj/item/integrated_circuit/trig/cotangent/do_work()
|
||||
pull_data()
|
||||
var/result = null
|
||||
var/datum/integrated_io/input/A = inputs[1]
|
||||
A.pull_data()
|
||||
if(isnum(A.data))
|
||||
result = Cot(A.data)
|
||||
var/A = get_pin_data(IC_INPUT, 1)
|
||||
if(isnum(A))
|
||||
result = Cot(A)
|
||||
|
||||
var/datum/integrated_io/output/O = outputs[1]
|
||||
O.data = result
|
||||
O.push_data()
|
||||
set_pin_data(IC_OUTPUT, 1, result)
|
||||
push_data()
|
||||
activate_pin(2)
|
||||
@@ -38,16 +38,11 @@
|
||||
|
||||
/datum/lore/codex/page/unathi
|
||||
name = "Unathi"
|
||||
data = "The author wishes to apologize to the reader, as they currently lack enough knowledge of the Unathi to write about them, as they are \
|
||||
rather rare inside Vir." // Replace this when Anewbe finishes the lizard rewrite.
|
||||
/*
|
||||
data = "Raging in from Moghes, the Unathi are a race of tall, reptilian humanoids that possess both crocodile-like and serpent-like features. \
|
||||
They are a proud, warlike species that favors honor and strength, their home, Moghes, is a desert planet but was once believed to be full of life. \
|
||||
Of all the currently known sentient species, the Unathi are the most unequal in gender with females tending to be property of the males. Most Unathi \
|
||||
outside of Moghes tend to be exiles however, and with influence of other species the gender difference is not nearly as pronounced. Unathi were \
|
||||
humanity's second contact, and despite their aggressive nature, seem to get along well enough with humanity, though are often considered to be \
|
||||
'second-class' citizens and are rarely seen in jobs other than where muscle is needed." // This probably needs to be updated.
|
||||
*/
|
||||
data = "The Unathi are a race of tall, reptilian humanoids that possess a blend of serpentine features reminiscent of crocodiles. \
|
||||
They are a proud, religious species that favors honor and strength, and originate from the desert planet of Moghes. \
|
||||
The Unathi follow a religious code known as the Unity, and they carry this with them on their travels. \
|
||||
Unathi once fought a serious war against SolGov, and as a result are often considered to be second-class citizens, \
|
||||
rarely seen in jobs that don't require a little muscle."
|
||||
|
||||
/datum/lore/codex/page/tajaran
|
||||
name = "Tajaran"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
recipes += new/datum/stack_recipe("[display_name] baseball bat", /obj/item/weapon/material/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] ashtray", /obj/item/weapon/material/ashtray, 2, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] spoon", /obj/item/weapon/material/kitchen/utensil/spoon/plastic, 1, on_floor = 1, supplied_material = "[name]")
|
||||
recipes += new/datum/stack_recipe("[display_name] armor plate", /obj/item/weapon/material/armor_plating, 1, time = 20, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
if(integrity>=50)
|
||||
recipes += new/datum/stack_recipe("[display_name] door", /obj/structure/simple_door, 10, one_per_turf = 1, on_floor = 1, supplied_material = "[name]")
|
||||
|
||||
@@ -90,10 +90,12 @@ var/list/name_to_material
|
||||
var/ignition_point // K, point at which the material catches on fire.
|
||||
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
|
||||
var/integrity = 150 // General-use HP value for products.
|
||||
var/protectiveness = 10 // How well this material works as armor. Higher numbers are better, diminishing returns applies.
|
||||
var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors.
|
||||
var/reflectivity = 0 // How reflective to light is the material? Currently used for laser defense.
|
||||
var/reflectivity = 0 // How reflective to light is the material? Currently used for laser reflection and defense.
|
||||
var/explosion_resistance = 5 // Only used by walls currently.
|
||||
var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn.
|
||||
var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10.
|
||||
var/list/composite_material // If set, object matter var will be a list containing these values.
|
||||
|
||||
// Placeholder vars for the time being, todo properly integrate windows/light tiles/rods.
|
||||
@@ -103,7 +105,7 @@ var/list/name_to_material
|
||||
var/list/window_options = list()
|
||||
|
||||
// Damage values.
|
||||
var/hardness = 60 // Prob of wall destruction by hulk, used for edge damage in weapons.
|
||||
var/hardness = 60 // Prob of wall destruction by hulk, used for edge damage in weapons. Also used for bullet protection in armor.
|
||||
var/weight = 20 // Determines blunt damage/throwforce for weapons.
|
||||
|
||||
// Noise when someone is faceplanted onto a table made of this material.
|
||||
@@ -236,6 +238,7 @@ var/list/name_to_material
|
||||
icon_colour = "#00FFE1"
|
||||
opacity = 0.4
|
||||
reflectivity = 0.6
|
||||
conductivity = 1
|
||||
shard_type = SHARD_SHARD
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 100
|
||||
@@ -247,6 +250,7 @@ var/list/name_to_material
|
||||
icon_colour = "#EDD12F"
|
||||
weight = 24
|
||||
hardness = 40
|
||||
conductivity = 41
|
||||
stack_origin_tech = list(TECH_MATERIAL = 4)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
@@ -261,6 +265,7 @@ var/list/name_to_material
|
||||
icon_colour = "#D1E6E3"
|
||||
weight = 22
|
||||
hardness = 50
|
||||
conductivity = 63
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
@@ -304,6 +309,8 @@ var/list/name_to_material
|
||||
shard_type = SHARD_STONE_PIECE
|
||||
weight = 22
|
||||
hardness = 55
|
||||
protectiveness = 5 // 20%
|
||||
conductivity = 5
|
||||
door_icon_base = "stone"
|
||||
sheet_singular_name = "brick"
|
||||
sheet_plural_name = "bricks"
|
||||
@@ -320,6 +327,8 @@ var/list/name_to_material
|
||||
name = DEFAULT_WALL_MATERIAL
|
||||
stack_type = /obj/item/stack/material/steel
|
||||
integrity = 150
|
||||
conductivity = 11 // Assuming this is carbon steel, it would actually be slightly less conductive than iron, but lets ignore that.
|
||||
protectiveness = 10 // 33%
|
||||
icon_base = "solid"
|
||||
icon_reinf = "reinf_over"
|
||||
icon_colour = "#666666"
|
||||
@@ -355,6 +364,8 @@ var/list/name_to_material
|
||||
explosion_resistance = 25
|
||||
hardness = 80
|
||||
weight = 23
|
||||
protectiveness = 20 // 50%
|
||||
conductivity = 13 // For the purposes of balance.
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
composite_material = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT, "platinum" = SHEET_MATERIAL_AMOUNT) //todo
|
||||
|
||||
@@ -370,6 +381,7 @@ var/list/name_to_material
|
||||
explosion_resistance = 75
|
||||
hardness = 100
|
||||
weight = 28
|
||||
protectiveness = 60 // 75%
|
||||
reflectivity = 0.7 // Not a perfect mirror, but close.
|
||||
stack_origin_tech = list(TECH_MATERIAL = 8)
|
||||
composite_material = list("plasteel" = SHEET_MATERIAL_AMOUNT, "diamond" = SHEET_MATERIAL_AMOUNT) //shrug
|
||||
@@ -377,6 +389,7 @@ var/list/name_to_material
|
||||
/material/plasteel/titanium
|
||||
name = "titanium"
|
||||
stack_type = null
|
||||
conductivity = 2.38
|
||||
icon_base = "metal"
|
||||
door_icon_base = "metal"
|
||||
icon_colour = "#D1E6E3"
|
||||
@@ -393,6 +406,8 @@ var/list/name_to_material
|
||||
tableslam_noise = 'sound/effects/Glasshit.ogg'
|
||||
hardness = 30
|
||||
weight = 15
|
||||
protectiveness = 0 // 0%
|
||||
conductivity = 1 // Glass shards don't conduct.
|
||||
door_icon_base = "stone"
|
||||
destruction_desc = "shatters"
|
||||
window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2)
|
||||
@@ -526,6 +541,8 @@ var/list/name_to_material
|
||||
icon_colour = "#CCCCCC"
|
||||
hardness = 10
|
||||
weight = 12
|
||||
protectiveness = 5 // 20%
|
||||
conductivity = 2 // For the sake of material armor diversity, we're gonna pretend this plastic is a good insulator.
|
||||
melting_point = T0C+371 //assuming heat resistant plastic
|
||||
stack_origin_tech = list(TECH_MATERIAL = 3)
|
||||
|
||||
@@ -556,12 +573,14 @@ var/list/name_to_material
|
||||
stack_type = /obj/item/stack/material/mhydrogen
|
||||
icon_colour = "#E6C5DE"
|
||||
stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 6, TECH_MAGNET = 5)
|
||||
conductivity = 100
|
||||
|
||||
/material/platinum
|
||||
name = "platinum"
|
||||
stack_type = /obj/item/stack/material/platinum
|
||||
icon_colour = "#9999FF"
|
||||
weight = 27
|
||||
conductivity = 9.43
|
||||
stack_origin_tech = list(TECH_MATERIAL = 2)
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
@@ -571,6 +590,7 @@ var/list/name_to_material
|
||||
stack_type = /obj/item/stack/material/iron
|
||||
icon_colour = "#5C5454"
|
||||
weight = 22
|
||||
conductivity = 10
|
||||
sheet_singular_name = "ingot"
|
||||
sheet_plural_name = "ingots"
|
||||
|
||||
@@ -585,6 +605,7 @@ var/list/name_to_material
|
||||
explosion_resistance = 200 // Hull plating.
|
||||
hardness = 500
|
||||
weight = 500
|
||||
protectiveness = 80 // 80%
|
||||
|
||||
// Likewise.
|
||||
/material/alienalloy/elevatorium
|
||||
@@ -603,6 +624,8 @@ var/list/name_to_material
|
||||
shard_can_repair = 0 // you can't weld splinters back into planks
|
||||
hardness = 15
|
||||
weight = 18
|
||||
protectiveness = 8 // 28%
|
||||
conductivity = 1
|
||||
melting_point = T0C+300 //okay, not melting in this case, but hot enough to destroy wood
|
||||
ignition_point = T0C+288
|
||||
stack_origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
|
||||
@@ -634,6 +657,7 @@ var/list/name_to_material
|
||||
icon_colour = "#AAAAAA"
|
||||
hardness = 1
|
||||
weight = 1
|
||||
protectiveness = 0 // 0%
|
||||
ignition_point = T0C+232 //"the temperature at which book-paper catches fire, and burns." close enough
|
||||
melting_point = T0C+232 //temperature at which cardboard walls would be destroyed
|
||||
stack_origin_tech = list(TECH_MATERIAL = 1)
|
||||
@@ -650,6 +674,7 @@ var/list/name_to_material
|
||||
integrity = 1
|
||||
hardness = 1
|
||||
weight = 1
|
||||
protectiveness = 0 // 0%
|
||||
stack_origin_tech = list(TECH_MATERIAL = 1)
|
||||
melting_point = T0C+1
|
||||
destruction_desc = "crumples"
|
||||
@@ -662,6 +687,7 @@ var/list/name_to_material
|
||||
door_icon_base = "wood"
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
flags = MATERIAL_PADDING
|
||||
|
||||
/material/cult
|
||||
@@ -695,6 +721,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+300
|
||||
melting_point = T0C+300
|
||||
protectiveness = 3 // 13%
|
||||
|
||||
/material/carpet
|
||||
name = "carpet"
|
||||
@@ -706,6 +733,7 @@ var/list/name_to_material
|
||||
melting_point = T0C+300
|
||||
sheet_singular_name = "tile"
|
||||
sheet_plural_name = "tiles"
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cotton
|
||||
name = "cotton"
|
||||
@@ -714,7 +742,9 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
// This all needs to be OOP'd and use inheritence if its ever used in the future.
|
||||
/material/cloth_teal
|
||||
name = "teal"
|
||||
display_name ="teal"
|
||||
@@ -723,6 +753,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_black
|
||||
name = "black"
|
||||
@@ -732,6 +763,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_green
|
||||
name = "green"
|
||||
@@ -741,6 +773,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_puple
|
||||
name = "purple"
|
||||
@@ -750,6 +783,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_blue
|
||||
name = "blue"
|
||||
@@ -759,6 +793,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_beige
|
||||
name = "beige"
|
||||
@@ -768,6 +803,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/cloth_lime
|
||||
name = "lime"
|
||||
@@ -777,6 +813,7 @@ var/list/name_to_material
|
||||
flags = MATERIAL_PADDING
|
||||
ignition_point = T0C+232
|
||||
melting_point = T0C+300
|
||||
protectiveness = 1 // 4%
|
||||
|
||||
/material/toy_foam
|
||||
name = "foam"
|
||||
@@ -787,4 +824,5 @@ var/list/name_to_material
|
||||
melting_point = T0C+300
|
||||
icon_colour = "#ff9900"
|
||||
hardness = 1
|
||||
weight = 1
|
||||
weight = 1
|
||||
protectiveness = 0 // 0%
|
||||
@@ -37,7 +37,7 @@
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(istype(H) && H.has_eyes() && prob(85))
|
||||
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
|
||||
H.eye_blind += 5
|
||||
H.Blind(5)
|
||||
H.eye_blurry += 10
|
||||
spawn(1)
|
||||
if(istype(loc, /turf/)) qdel(src)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/language/unathi
|
||||
name = LANGUAGE_UNATHI
|
||||
desc = "The common language of Moghes, composed of sibilant hisses and rattles. Spoken natively by Unathi."
|
||||
desc = "The common language of the Moghes Hegemony, composed of sibilant hisses and rattles. Spoken natively by Unathi."
|
||||
speech_verb = "hisses"
|
||||
ask_verb = "hisses"
|
||||
exclaim_verb = "roars"
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
|
||||
/mob/living/bot/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
health = maxHealth
|
||||
health = getMaxHealth()
|
||||
stat = CONSCIOUS
|
||||
else
|
||||
health = maxHealth - getFireLoss() - getBruteLoss()
|
||||
health = getMaxHealth() - getFireLoss() - getBruteLoss()
|
||||
oxyloss = 0
|
||||
toxloss = 0
|
||||
cloneloss = 0
|
||||
@@ -104,9 +104,9 @@
|
||||
user << "<span class='notice'>You need to unlock the controls first.</span>"
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/weldingtool))
|
||||
if(health < maxHealth)
|
||||
if(health < getMaxHealth())
|
||||
if(open)
|
||||
health = min(maxHealth, health + 10)
|
||||
health = min(getMaxHealth(), health + 10)
|
||||
user.visible_message("<span class='notice'>[user] repairs [src].</span>","<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
user << "<span class='notice'>Unable to repair with the maintenance panel closed.</span>"
|
||||
@@ -224,7 +224,7 @@
|
||||
/mob/living/bot/proc/getPatrolTurf()
|
||||
var/minDist = INFINITY
|
||||
var/obj/machinery/navbeacon/targ = locate() in get_turf(src)
|
||||
|
||||
|
||||
if(!targ)
|
||||
for(var/obj/machinery/navbeacon/N in navbeacons)
|
||||
if(!N.codes["patrol"])
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user