mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Conflicts: code/game/machinery/computer/lockdown.dm Signed-off-by: caelaislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -238,9 +238,8 @@ obj/machinery/computer/forensic_scanning
|
||||
var/list/blood = outputs[3]
|
||||
if(blood && blood.len)
|
||||
temp += " <b>Blood:</b><br>"
|
||||
for(var/j = 1, j <= blood.len, j++)
|
||||
var/list/templist2 = blood[j]
|
||||
temp += " Type: [templist2[2]], DNA: [templist2[1]]<br>"
|
||||
for(var/named in blood)
|
||||
temp += " Type: [blood[named]], DNA: [named]<br>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=database;delete_record=[href_list["identifier"]]'>{Delete this Dossier}</a>"
|
||||
temp += "<br><a href='?src=\ref[src];operation=databaseprint;identifier=[href_list["identifier"]]'>{Print}</a>"
|
||||
else
|
||||
|
||||
@@ -104,7 +104,7 @@ datum
|
||||
on_mob_life(var/mob/living/M)
|
||||
if(!data || !data["blood_type"])
|
||||
..()
|
||||
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type))
|
||||
else if(istype(M, /mob/living/carbon/human) && blood_incompatible(data["blood_type"],M.dna.b_type) && !M.changeling)
|
||||
M.adjustToxLoss(rand(0.5,1.5))
|
||||
M.adjustOxyLoss(rand(1,1.5))
|
||||
..()
|
||||
@@ -1862,7 +1862,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(prob(50)) M:heal_organ_damage(1,0)
|
||||
if(prob(1)) M:heal_organ_damage(0.5,0) //This should stop being able to heal out of crit from eating a donut
|
||||
M:nutrition += nutriment_factor // For hunger and fatness
|
||||
/*
|
||||
// If overeaten - vomit and fall down
|
||||
|
||||
@@ -185,9 +185,10 @@
|
||||
if(W:amount >= 1)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
W:use(1)
|
||||
user << "\blue You put in the glass lens."
|
||||
src.state = 5
|
||||
if(W)
|
||||
W:use(1)
|
||||
user << "\blue You put in the glass lens."
|
||||
src.state = 5
|
||||
if(5)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/g_eyes = 0.0
|
||||
var/b_eyes = 0.0
|
||||
var/s_tone = 0.0
|
||||
var/species = "Human"
|
||||
age = 30.0
|
||||
var/used_skillpoints = 0
|
||||
var/skill_specialization = null
|
||||
|
||||
@@ -872,7 +872,7 @@
|
||||
if(E.name == "l_hand" || E.name == "l_arm")
|
||||
if(hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their limb malfunctioning!")
|
||||
emote("custom v drops what they were holding, their [E] malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
@@ -882,7 +882,7 @@
|
||||
else if(E.name == "r_hand" || E.name == "r_arm")
|
||||
if(!hand && equipped())
|
||||
drop_item()
|
||||
emote("custom v drops what they were holding, their limb malfunctioning!")
|
||||
emote("custom v drops what they were holding, their [E] malfunctioning!")
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
@@ -915,6 +915,15 @@
|
||||
var/blood_volume = round(vessel.get_reagent_amount("blood"))
|
||||
if(bloodloss)
|
||||
drip(bloodloss)
|
||||
else if(blood_volume < 560 && blood_volume)
|
||||
var/datum/reagent/blood/B = locate() in vessel //Grab some blood
|
||||
if(!B.data["donor"] == src) //If it's not theirs, then we look for theirs
|
||||
for(var/datum/reagent/blood/D in vessel)
|
||||
if(D.data["donor"] == src)
|
||||
B = D
|
||||
break
|
||||
//At this point, we dun care which blood we are adding to, as long as they get more blood.
|
||||
B.volume = max(min(B.volume + 560/blood_volume,560), 0) //Less blood = More blood generated per tick
|
||||
if(!blood_volume)
|
||||
bloodloss = 0
|
||||
else if(blood_volume > 448)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
return//Whatever the case, return since you can't move anyway.
|
||||
|
||||
if(user.client)//To make AI holograms work. They will relay directions as long as they are centered on the object.
|
||||
var/obj/machinery/hologram/holopad/T = user.client.eye//Client eye centers on an object.
|
||||
var/obj/machinery/hologram/holopad/T = user.current//Client eye centers on an object.
|
||||
if(istype(T)&&T.hologram&&T.master==user)//If there is a hologram and its master is the user.
|
||||
T.hologram.loc = get_step(T.hologram, direct)
|
||||
T.hologram.dir = direct
|
||||
|
||||
@@ -392,7 +392,11 @@
|
||||
|
||||
proc/create_character()
|
||||
spawning = 1
|
||||
var/mob/living/carbon/human/new_character = new(loc)
|
||||
var/mob/living/carbon/human/new_character // var/path/to/object/varname
|
||||
if(preferences.species == "Tajaran")
|
||||
new_character = new /mob/living/carbon/human/tajaran(loc) // varname = new /path/to/object(location_to_spawn_at)
|
||||
else
|
||||
new_character = new /mob/living/carbon/human(loc)
|
||||
new_character.lastarea = get_area(loc)
|
||||
|
||||
close_spawn_windows()
|
||||
@@ -403,8 +407,9 @@
|
||||
preferences.randomize_appearance_for(new_character)
|
||||
else
|
||||
preferences.copy_to(new_character)
|
||||
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
if(preferences.species == "Soghun") //This probably shouldn't be here, but I can't think of any other way
|
||||
new_character.mutantrace = "lizard"
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
|
||||
new_character.dna.ready_dna(new_character)
|
||||
preferences.copydisabilities(new_character)
|
||||
|
||||
@@ -90,6 +90,9 @@ datum/preferences
|
||||
g_facial = 0
|
||||
b_facial = 0
|
||||
|
||||
//Species
|
||||
species = "Human"
|
||||
|
||||
//Skin color
|
||||
s_tone = 0
|
||||
|
||||
@@ -281,6 +284,7 @@ datum/preferences
|
||||
dat += "<hr><table><tr><td><b>Body</b> "
|
||||
dat += "(<a href=\"byond://?src=\ref[user];preferences=1;s_tone=random;underwear=random;backbag_type=random;age=random;b_type=random;hair=random;h_style=random;facial=random;f_style=random;eyes=random\">®</A>)" // Random look
|
||||
dat += "<br>"
|
||||
dat += "Species: <a href='byond://?src=\ref[user];preferences=1;species=input'>[species]</a><br>"
|
||||
dat += "Blood Type: <a href='byond://?src=\ref[user];preferences=1;b_type=input'>[b_type]</a><br>"
|
||||
dat += "Skin Tone: <a href='byond://?src=\ref[user];preferences=1;s_tone=input'>[-s_tone + 35]/220<br></a>"
|
||||
|
||||
@@ -696,6 +700,23 @@ datum/preferences
|
||||
if("random")
|
||||
b_type = pickweight ( list ("A+" = 31, "A-" = 7, "B+" = 8, "B-" = 2, "AB+" = 2, "AB-" = 1, "O+" = 40, "O-" = 9))
|
||||
|
||||
if(link_tags["species"])
|
||||
switch(link_tags["species"])
|
||||
if("input")
|
||||
var/list/new_species = list("Human")
|
||||
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
|
||||
if((is_alien_whitelisted(user, "Soghun")) || ((user.client) && (user.client.holder) && (user.client.holder.level) && (user.client.holder.level >= 5))) //Check for Soghun and admins
|
||||
new_species += "Soghun"
|
||||
if((is_alien_whitelisted(user, "Tajaran")) || ((user.client) && (user.client.holder) && (user.client.holder.level) && (user.client.holder.level >= 5))) //Check for Tajaran
|
||||
new_species += "Tajaran"
|
||||
else //Not using the whitelist? Aliens for everyone!
|
||||
new_species += "Tajaran"
|
||||
new_species += "Soghun"
|
||||
species = input("Please select a species", "Character Generation", null) in new_species
|
||||
h_style = "Bald" //Try not to carry face/head hair over.
|
||||
f_style = "Shaved"
|
||||
hair_style = new/datum/sprite_accessory/hair/bald
|
||||
facial_hair_style = new/datum/sprite_accessory/facial_hair/shaved
|
||||
|
||||
if(link_tags["hair"])
|
||||
switch(link_tags["hair"])
|
||||
@@ -735,14 +756,18 @@ datum/preferences
|
||||
if("random")
|
||||
randomize_skin_tone()
|
||||
if("input")
|
||||
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
|
||||
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black) or 20-70 for Tajarans", "Character Generation") as text
|
||||
if(new_tone)
|
||||
s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
if(species == "Tajaran")
|
||||
s_tone = max(min(round(text2num(new_tone)), 70), 20)
|
||||
else
|
||||
s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
s_tone = -s_tone + 35
|
||||
|
||||
if(link_tags["h_style"])
|
||||
if(species != "Human")
|
||||
return
|
||||
switch(link_tags["h_style"])
|
||||
|
||||
// New and improved hair selection code, by Doohl
|
||||
if("random") // random hair selection
|
||||
|
||||
@@ -785,6 +810,8 @@ datum/preferences
|
||||
src.ooccolor = ooccolor
|
||||
|
||||
if(link_tags["f_style"])
|
||||
if(species != "Human") //Tajarans and Soghuns don't have hair stuff yet.
|
||||
return
|
||||
switch(link_tags["f_style"])
|
||||
|
||||
// see above for commentation. This is just a slight modification of the hair code for facial hairs
|
||||
|
||||
@@ -209,7 +209,15 @@ datum/preferences
|
||||
else if (gender == FEMALE)
|
||||
g = "f"
|
||||
|
||||
preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir)
|
||||
if(species == "Tajaran")
|
||||
preview_icon = new /icon('tajaran.dmi', "body_[g]_s", "dir" = preview_dir)
|
||||
else if(species == "Soghun")
|
||||
if(g == "m")
|
||||
preview_icon = new /icon('genetics.dmi', "lizard_male_s", "dir" = preview_dir)
|
||||
else if(g == "f")
|
||||
preview_icon = new /icon('genetics.dmi', "lizard_female_s", "dir" = preview_dir)
|
||||
else
|
||||
preview_icon = new /icon('human.dmi', "body_[g]_s", "dir" = preview_dir)
|
||||
|
||||
// Skin tone
|
||||
if (s_tone >= 0)
|
||||
|
||||
@@ -131,6 +131,7 @@ datum/preferences/proc/savefile_save(mob/user, slot)
|
||||
F["eyes_green"] << src.g_eyes
|
||||
F["eyes_blue"] << src.b_eyes
|
||||
F["blood_type"] << src.b_type
|
||||
F["species"] << src.species
|
||||
F["underwear"] << src.underwear
|
||||
F["backbag"] << src.backbag
|
||||
F["backbag"] << src.backbag
|
||||
@@ -206,6 +207,8 @@ datum/preferences/proc/savefile_load(mob/user, slot)
|
||||
F["eyes_green"] >> src.g_eyes
|
||||
F["eyes_blue"] >> src.b_eyes
|
||||
F["blood_type"] >> src.b_type
|
||||
F["species"] >> src.species
|
||||
if(isnull(species)) species = "Human"
|
||||
F["underwear"] >> src.underwear
|
||||
if(underwear == 0) underwear = 6 //For old players who have 0 in their savefile
|
||||
F["backbag"] >> src.backbag
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
del(O.organs)
|
||||
O.organs = organs
|
||||
for(var/name in O.organs)
|
||||
var/datum/organ/external/organ = O[name]
|
||||
var/datum/organ/external/organ = O.organs[name]
|
||||
organ.owner = O
|
||||
for(var/obj/item/weapon/implant/implant in organ.implant)
|
||||
implant.imp_in = O
|
||||
@@ -390,18 +390,8 @@
|
||||
O << "4.) Your laws are not in preference, laws do not take preference over one another unless specifically stated in the law."
|
||||
O << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
|
||||
|
||||
//If you add a verb here, make sure to add it to silicon\ai\ai.dm too.
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
|
||||
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_camera_track
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_alerts
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_camera_list
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_network_change
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_statuschange
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_hologram_change
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_roster
|
||||
O.verbs += AI_VERB_LIST
|
||||
|
||||
// O.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
|
||||
O.job = "AI"
|
||||
|
||||
spawn(0)
|
||||
|
||||
+46
-46
@@ -150,23 +150,23 @@
|
||||
if(usr /*&& !usr.stat*/)
|
||||
usr << "A control terminal for the area electrical systems."
|
||||
if(stat & BROKEN)
|
||||
usr << "Looks broken."
|
||||
usr << "It looks broken."
|
||||
return
|
||||
if(opened)
|
||||
if(has_electronics && terminal)
|
||||
usr << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
|
||||
else if (!has_electronics && terminal)
|
||||
usr << "There are some wires but no any electronics."
|
||||
usr << "There are some wires but no electronics."
|
||||
else if (has_electronics && !terminal)
|
||||
usr << "Electronics installed but not wired."
|
||||
usr << "There are electronics installed but they're not wired."
|
||||
else /* if (!has_electronics && !terminal) */
|
||||
usr << "There is no electronics nor connected wires."
|
||||
usr << "There are no electronics or any connected wires."
|
||||
|
||||
else
|
||||
if (stat & MAINT)
|
||||
usr << "The cover is closed. Something is wrong with it, it doesn't work."
|
||||
usr << "The cover is closed. It looks like it 's not working."
|
||||
else if (malfhack)
|
||||
usr << "The cover is broken. It may be hard to force it open."
|
||||
usr << "The cover is broken. It looks like it'll be hard to force open."
|
||||
else
|
||||
usr << "The cover is closed."
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
if (istype(W, /obj/item/weapon/crowbar) && opened)
|
||||
if (has_electronics==1)
|
||||
if (terminal)
|
||||
user << "\red Disconnect wires first."
|
||||
user << "\red You need to cut the wires first."
|
||||
return
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
user << "You try to remove the power control board..."
|
||||
@@ -222,7 +222,7 @@
|
||||
if ((stat & BROKEN) || malfhack)
|
||||
user.visible_message(\
|
||||
"\red [user.name] has broken the power control board inside [src.name]!",\
|
||||
"You broke the charred power control board and remove the remains.",
|
||||
"You break the charred power control board and remove the remains.",
|
||||
"You hear a crack!")
|
||||
//ticker.mode:apcs-- //XSI said no and I agreed. -rastaf0
|
||||
else
|
||||
@@ -238,7 +238,7 @@
|
||||
user.visible_message("\red [user] starts removing the broken APC cover with \the [W]!", \
|
||||
"\red You start removing the broken APC cover!")
|
||||
if(do_after(user, 50))
|
||||
user.visible_message("\red The broken APC cover was removed with \the [W] by [user.name]!", \
|
||||
user.visible_message("\red [user.name] removes the broken APC cover with \the [W]!", \
|
||||
"\red You remove the broken APC cover with your [W.name]!")
|
||||
opened = 2
|
||||
cover_unscrewed = 0
|
||||
@@ -254,24 +254,24 @@
|
||||
updateicon()
|
||||
else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside
|
||||
if(cell)
|
||||
user << "There is a power cell already installed."
|
||||
user << "There's a power cell installed already."
|
||||
return
|
||||
else
|
||||
if (stat & MAINT)
|
||||
user << "\red There is no any connector for your power cell."
|
||||
user << "\red There aren't any connectors for the power cell."
|
||||
return
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
cell = W
|
||||
user.visible_message(\
|
||||
"\red [user.name] has inserted the power cell to [src.name]!",\
|
||||
"\red [user.name] has inserted the power cell into [src.name]!",\
|
||||
"You insert the power cell.")
|
||||
chargecount = 0
|
||||
updateicon()
|
||||
else if (istype(W, /obj/item/weapon/screwdriver)) // haxing
|
||||
if(opened)
|
||||
if (cell)
|
||||
user << "\red Remove the power cell first." //FUCK YOU, USEFUL MESSAGES ARE GOOD
|
||||
user << "\red You need to remove the power cell first." //FUCK YOU, USEFUL MESSAGES ARE GOOD
|
||||
return
|
||||
else
|
||||
if (has_electronics==1 && terminal)
|
||||
@@ -285,7 +285,7 @@
|
||||
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
|
||||
user << "You unfasten the electronics."
|
||||
else /* has_electronics==0 */
|
||||
user << "\red There is nothing to secure."
|
||||
user << "\red There's nothing to secure here."
|
||||
return
|
||||
updateicon()
|
||||
else if((stat & BROKEN) || malfhack)
|
||||
@@ -293,12 +293,12 @@
|
||||
user.visible_message("\red [user] starts unscrewing the broken APC cover with \the [W]!", \
|
||||
"\red You start unscrewing the broken APC cover!")
|
||||
if(do_after(user, 50))
|
||||
user.visible_message("\red The broken APC cover was unscrewed with \the [W] by [user.name]!", \
|
||||
user.visible_message("\red [user.name] unscrews the broken APC cover with \the [W]!", \
|
||||
"\red You unscrew the broken APC cover with your [W.name]!")
|
||||
cover_unscrewed = 1
|
||||
updateicon()
|
||||
else if(emagged)
|
||||
user << "The interface is broken."
|
||||
user << "The interface seems broken."
|
||||
else
|
||||
wiresexposed = !wiresexposed
|
||||
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
||||
@@ -306,11 +306,11 @@
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged)
|
||||
user << "The interface is broken."
|
||||
user << "The interface seems broken."
|
||||
else if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
user << "You have to close the cover to swipe an ID card."
|
||||
else if(wiresexposed)
|
||||
user << "You must close the panel"
|
||||
user << "You have to close the panel."
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "Nothing happens."
|
||||
else
|
||||
@@ -328,9 +328,9 @@
|
||||
else
|
||||
return
|
||||
if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
user << "You have to close the cover to swipe an ID card."
|
||||
else if(wiresexposed)
|
||||
user << "You must close the panel first"
|
||||
user << "You have to close the panel first"
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "Nothing happens."
|
||||
else
|
||||
@@ -345,7 +345,7 @@
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] the APC interface."
|
||||
else if (istype(W, /obj/item/weapon/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
user << "\red There is no floor with the plating revealed in front of the APC."
|
||||
user << "\red You have to remove the floor plating in front of the APC first."
|
||||
return
|
||||
var/obj/item/weapon/cable_coil/C = W
|
||||
if(C.amount < 10)
|
||||
@@ -369,7 +369,7 @@
|
||||
terminal.connect_to_network()
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
|
||||
if (src.loc:intact)
|
||||
user << "\red You must remove the floor plating in front of the APC first."
|
||||
user << "\red You have to remove the floor plating in front of the APC first."
|
||||
return
|
||||
user << "You begin to cut cables..."
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
@@ -381,11 +381,11 @@
|
||||
return
|
||||
new /obj/item/weapon/cable_coil(loc,10)
|
||||
user.visible_message(\
|
||||
"\red [user.name] cut cables and dismantled the power terminal.",\
|
||||
"You cut cables and dismantle the power terminal.")
|
||||
"\red [user.name] cuts the cables and dismantles the power terminal.",\
|
||||
"You cut the cable and dismantle the power terminal.")
|
||||
del(terminal)
|
||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
user << "You try to insert the power control board into the frame..."
|
||||
user << "You start to insert the power control board into the frame..."
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10))
|
||||
has_electronics = 1
|
||||
@@ -396,7 +396,7 @@
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && W:welding && opened && has_electronics==0 && !terminal)
|
||||
if (W:get_fuel() < 3)
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
user << "\blue You need more welding fuel to do this."
|
||||
return
|
||||
user << "You start welding APC frame..."
|
||||
if(W:remove_fuel(0,user))
|
||||
@@ -407,13 +407,13 @@
|
||||
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut apart by [user.name] with the weldingtool.",\
|
||||
"You disassembled the broken APC frame.",\
|
||||
"\red \The [src] has been cut apart by [user.name] with the welding tool.",\
|
||||
"You disassemble the broken APC frame.",\
|
||||
"\red You hear welding.")
|
||||
else
|
||||
new /obj/item/apc_frame(loc)
|
||||
user.visible_message(\
|
||||
"\red [src] has been cut from the wall by [user.name] with the weldingtool.",\
|
||||
"\red \The [src] has been cut from the wall by [user.name] with the welding tool.",\
|
||||
"You cut APC frame from the wall.",\
|
||||
"\red You hear welding.")
|
||||
W:welding = 1
|
||||
@@ -424,19 +424,19 @@
|
||||
if (opened==2)
|
||||
opened = 1
|
||||
user.visible_message(\
|
||||
"\red [user.name] has replaced the damaged APC frontal panel with a new one.",\
|
||||
"You replace the damaged APC frontal panel with a new one.")
|
||||
"\red [user.name] replaces the damaged APC panel with a new one.",\
|
||||
"You replace the damaged APC panel with a new one.")
|
||||
del(W)
|
||||
updateicon()
|
||||
else if (istype(W, /obj/item/apc_frame) && opened && ((stat & BROKEN) || malfhack))
|
||||
if (has_electronics)
|
||||
user << "You cannot repair this APC until you remove the electronics still inside."
|
||||
user << "You cannot repair this APC until you remove the electronics inside."
|
||||
return
|
||||
user << "You begin to replace the damaged APC frame..."
|
||||
if(do_after(user, 50))
|
||||
user.visible_message(\
|
||||
"\red [user.name] has replaced the damaged APC frame with new one.",\
|
||||
"You replace the damaged APC frame with new one.")
|
||||
"\red [user.name] has replaced the damaged APC frame with a new one.",\
|
||||
"You replace the damaged APC frame with a new one.")
|
||||
del(W)
|
||||
stat &= ~BROKEN
|
||||
malfai = null
|
||||
@@ -452,8 +452,8 @@
|
||||
&& W.w_class >= 3.0 \
|
||||
&& prob(20) )
|
||||
opened = 2
|
||||
user.visible_message("\red The APC cover was knocked down with the [W.name] by [user.name]!", \
|
||||
"\red You knock down the APC cover with your [W.name]!", \
|
||||
user.visible_message("\red The APC cover has been knocked down with \the [W.name] by [user.name]!", \
|
||||
"\red You knock down the APC cover with \the [W.name]!", \
|
||||
"You hear a loud bang!")
|
||||
updateicon()
|
||||
else
|
||||
@@ -463,9 +463,9 @@
|
||||
(istype(W, /obj/item/device/multitool) || \
|
||||
istype(W, /obj/item/weapon/wirecutters)))
|
||||
return src.attack_hand(user)
|
||||
user.visible_message("\red The [src.name] has been hit with the [W.name] by [user.name]!", \
|
||||
"\red You hit the [src.name] with your [W.name]!", \
|
||||
"You hear bang")
|
||||
user.visible_message("\red The [src.name] has been hit with \the [W.name] by [user.name]!", \
|
||||
"\red You hit the [src.name] with \the [W.name]!", \
|
||||
"You hear a banging sound.")
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
@@ -769,7 +769,7 @@
|
||||
(istype(robot) && (robot in malfai.connected_robots)) \
|
||||
) \
|
||||
)
|
||||
user << "\red \The [src] have AI control disabled!"
|
||||
user << "\red \The [src] has it's AI control disabled!"
|
||||
user << browse(null, "window=apc")
|
||||
user.machine = null
|
||||
return 0
|
||||
@@ -782,10 +782,10 @@
|
||||
if (istype(H))
|
||||
if(H.getBrainLoss() >= 60)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M << "\red [H] stares cluelessly at [src] and drools."
|
||||
M << "\red [H] stares cluelessly at \the [src] and drools."
|
||||
return 0
|
||||
else if(prob(H.getBrainLoss()))
|
||||
user << "\red You momentarily forget how to use [src]."
|
||||
user << "\red You momentarily forget how to use \the [src]."
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -873,7 +873,7 @@
|
||||
if (malfai.malfhacking)
|
||||
malfai << "You are already hacking an APC."
|
||||
return
|
||||
malfai << "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process."
|
||||
malfai << "Beginning override of APC systems. This will take some time, and you cannot perform other actions during the process."
|
||||
malfai.malfhack = src
|
||||
malfai.malfhacking = 1
|
||||
sleep(600)
|
||||
@@ -932,7 +932,7 @@
|
||||
del(src.occupant)
|
||||
|
||||
else
|
||||
src.occupant << "\red Primary core damaged, unable to return core processes."
|
||||
src.occupant << "\red Primary core damaged, unable to return to core processes."
|
||||
if(forced)
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.death()
|
||||
@@ -958,7 +958,7 @@
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red The [src.name] suddenly lets out a blast of smoke and some sparks!", 3, "\red You hear sizzling electronics.", 2)
|
||||
M.show_message("\red The [src.name] suddenly lets out a blast of smoke and sparks!", 3, "\red You hear sizzling electronics.", 2)
|
||||
|
||||
|
||||
/obj/machinery/power/apc/surplus()
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
overlays += image('power.dmi', "cell-o1")
|
||||
|
||||
/obj/item/weapon/cell/proc/percent() // return % charge of cell
|
||||
return 100.0*charge/maxcharge
|
||||
if(maxcharge)
|
||||
return 100.0*charge/maxcharge
|
||||
return 0
|
||||
|
||||
// use power from a cell
|
||||
/obj/item/weapon/cell/proc/use(var/amount)
|
||||
|
||||
Reference in New Issue
Block a user