Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
internal_damage_threshold = 50
|
||||
armor = list(melee = 30, bullet = 30, laser = 15, energy = 20, bomb = 20, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
|
||||
/obj/mecha/combat/CheckParts(atom/holder)
|
||||
/obj/mecha/combat/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/stock_parts/capacitor/C = locate() in holder
|
||||
var/obj/item/weapon/stock_parts/scanning_module/SM = locate() in holder
|
||||
var/obj/item/weapon/stock_parts/capacitor/C = locate() in contents
|
||||
var/obj/item/weapon/stock_parts/scanning_module/SM = locate() in contents
|
||||
step_energy_drain = 20 - (5 * SM.rating) //10 is normal, so on lowest part its worse, on second its ok and on higher its real good up to 0 on best
|
||||
armor["energy"] += (C.rating * 10) //Each level of capacitor protects the mech against emp by 10%
|
||||
qdel(C)
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/Destroy()
|
||||
rcd_list -= src
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target)
|
||||
if(istype(target, /turf/open/space/transit))//>implying these are ever made -Sieve
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
name = "\improper MKI Tesla Cannon"
|
||||
desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine"
|
||||
icon_state = "mecha_ion"
|
||||
origin_tech = "materials=4;combat=5;magnets=4"
|
||||
origin_tech = "materials=4;engineering=4;combat=6;magnets=6"
|
||||
energy_drain = 500
|
||||
projectile = /obj/item/projectile/energy/tesla_cannon
|
||||
fire_sound = 'sound/magic/lightningbolt.ogg'
|
||||
@@ -174,7 +174,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
|
||||
continue
|
||||
M << "<font color='red' size='7'>HONK</font>"
|
||||
to_chat(M, "<font color='red' size='7'>HONK</font>")
|
||||
M.SetSleeping(0)
|
||||
M.stuttering += 20
|
||||
M.adjustEarDamage(0, 30)
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
icon_keyboard = "rd_key"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/mech_bay_power_console
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/attack_ai(mob/user)
|
||||
return interact(user)
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in oview(5,src))
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in oview(7,src))
|
||||
if(!RDC.sync)
|
||||
continue
|
||||
for(var/v in RDC.files.known_tech)
|
||||
@@ -431,26 +431,26 @@
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet))
|
||||
if(panel_open)
|
||||
user << "<span class='warning'>You can't load [src] while it's opened!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
|
||||
return 1
|
||||
if(being_built)
|
||||
user << "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is currently processing! Please wait until completion.</span>")
|
||||
return 1
|
||||
|
||||
var/material_amount = materials.get_item_material_amount(W)
|
||||
if(!material_amount)
|
||||
user << "<span class='warning'>This object does not contain sufficient amounts of materials to be accepted by [src].</span>"
|
||||
to_chat(user, "<span class='warning'>This object does not contain sufficient amounts of materials to be accepted by [src].</span>")
|
||||
return 1
|
||||
if(!materials.has_space(material_amount))
|
||||
user << "<span class='warning'>\The [src] is full. Please remove some materials from [src] in order to insert more.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is full. Please remove some materials from [src] in order to insert more.</span>")
|
||||
return 1
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
user << "<span class='warning'>\The [W] is stuck to you and cannot be placed into [src].</span>"
|
||||
to_chat(user, "<span class='warning'>\The [W] is stuck to you and cannot be placed into [src].</span>")
|
||||
return 1
|
||||
|
||||
var/inserted = materials.insert_item(W)
|
||||
if(inserted)
|
||||
user << "<span class='notice'>You insert [inserted] sheet\s into [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You insert [inserted] sheet\s into [src].</span>")
|
||||
if(W && W.materials.len)
|
||||
if(!QDELETED(W))
|
||||
user.put_in_active_hand(W)
|
||||
|
||||
+50
-51
@@ -251,19 +251,19 @@
|
||||
var/integrity = obj_integrity*100/max_integrity
|
||||
switch(integrity)
|
||||
if(85 to 100)
|
||||
user << "It's fully intact."
|
||||
to_chat(user, "It's fully intact.")
|
||||
if(65 to 85)
|
||||
user << "It's slightly damaged."
|
||||
to_chat(user, "It's slightly damaged.")
|
||||
if(45 to 65)
|
||||
user << "It's badly damaged."
|
||||
to_chat(user, "It's badly damaged.")
|
||||
if(25 to 45)
|
||||
user << "It's heavily damaged."
|
||||
to_chat(user, "It's heavily damaged.")
|
||||
else
|
||||
user << "It's falling apart."
|
||||
to_chat(user, "It's falling apart.")
|
||||
if(equipment && equipment.len)
|
||||
user << "It's equipped with:"
|
||||
to_chat(user, "It's equipped with:")
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
|
||||
user << "\icon[ME] [ME]"
|
||||
to_chat(user, "\icon[ME] [ME]")
|
||||
|
||||
//processing internal damage, temperature, air regulation, alert updates, lights power use.
|
||||
/obj/mecha/process()
|
||||
@@ -466,7 +466,7 @@
|
||||
if(istype(backup) && movement_dir && !backup.anchored)
|
||||
if(backup.newtonian_move(turn(movement_dir, 180)))
|
||||
if(occupant)
|
||||
occupant << "<span class='info'>You push off of [backup] to propel yourself.</span>"
|
||||
to_chat(occupant, "<span class='info'>You push off of [backup] to propel yourself.</span>")
|
||||
return 1
|
||||
|
||||
/obj/mecha/relaymove(mob/user,direction)
|
||||
@@ -474,7 +474,7 @@
|
||||
return
|
||||
if(user != occupant) //While not "realistic", this piece is player friendly.
|
||||
user.forceMove(get_turf(src))
|
||||
user << "<span class='notice'>You climb out from [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You climb out from [src].</span>")
|
||||
return 0
|
||||
if(connected_port)
|
||||
if(world.time - last_message > 20)
|
||||
@@ -626,26 +626,25 @@
|
||||
if(user.can_dominate_mechs)
|
||||
examine(user) //Get diagnostic information!
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)
|
||||
user << "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:"
|
||||
user << "[B.get_mecha_info()]"
|
||||
to_chat(user, "<span class='danger'>Warning: Tracking Beacon detected. Enter at your own risk. Beacon Data:")
|
||||
to_chat(user, "[B.get_mecha_info()]")
|
||||
break
|
||||
//Nothing like a big, red link to make the player feel powerful!
|
||||
user << "<a href='?src=\ref[user];ai_take_control=\ref[src]'><span class='userdanger'>ASSUME DIRECT CONTROL?</span></a><br>"
|
||||
to_chat(user, "<a href='?src=\ref[user];ai_take_control=\ref[src]'><span class='userdanger'>ASSUME DIRECT CONTROL?</span></a><br>")
|
||||
else
|
||||
examine(user)
|
||||
if(occupant)
|
||||
user << "<span class='warning'>This exosuit has a pilot and cannot be controlled.</span>"
|
||||
to_chat(user, "<span class='warning'>This exosuit has a pilot and cannot be controlled.</span>")
|
||||
return
|
||||
var/can_control_mech = 0
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/ai_control/A in trackers)
|
||||
can_control_mech = 1
|
||||
user << "<span class='notice'>\icon[src] Status of [name]:</span>\n\
|
||||
[A.get_mecha_info()]"
|
||||
to_chat(user, "<span class='notice'>\icon[src] Status of [name]:</span>\n[A.get_mecha_info()]")
|
||||
break
|
||||
if(!can_control_mech)
|
||||
user << "<span class='warning'>You cannot control exosuits without AI control beacons installed.</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot control exosuits without AI control beacons installed.</span>")
|
||||
return
|
||||
user << "<a href='?src=\ref[user];ai_take_control=\ref[src]'><span class='boldnotice'>Take control of exosuit?</span></a><br>"
|
||||
to_chat(user, "<a href='?src=\ref[user];ai_take_control=\ref[src]'><span class='boldnotice'>Take control of exosuit?</span></a><br>")
|
||||
|
||||
/obj/mecha/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
|
||||
if(!..())
|
||||
@@ -655,11 +654,11 @@
|
||||
switch(interaction)
|
||||
if(AI_TRANS_TO_CARD) //Upload AI from mech to AI card.
|
||||
if(!state) //Mech must be in maint mode to allow carding.
|
||||
user << "<span class='warning'>[name] must have maintenance protocols active in order to allow a transfer.</span>"
|
||||
to_chat(user, "<span class='warning'>[name] must have maintenance protocols active in order to allow a transfer.</span>")
|
||||
return
|
||||
AI = occupant
|
||||
if(!AI || !isAI(occupant)) //Mech does not have an AI for a pilot
|
||||
user << "<span class='warning'>No AI detected in the [name] onboard computer.</span>"
|
||||
to_chat(user, "<span class='warning'>No AI detected in the [name] onboard computer.</span>")
|
||||
return
|
||||
AI.ai_restore_power()//So the AI initially has power.
|
||||
AI.control_disabled = 1
|
||||
@@ -670,32 +669,32 @@
|
||||
AI.controlled_mech = null
|
||||
AI.remote_control = null
|
||||
icon_state = initial(icon_state)+"-open"
|
||||
AI << "You have been downloaded to a mobile storage device. Wireless connection offline."
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory."
|
||||
to_chat(AI, "You have been downloaded to a mobile storage device. Wireless connection offline.")
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) removed from [name] and stored within local memory.")
|
||||
|
||||
if(AI_MECH_HACK) //Called by AIs on the mech
|
||||
AI.linked_core = new /obj/structure/AIcore/deactivated(AI.loc)
|
||||
if(AI.can_dominate_mechs)
|
||||
if(occupant) //Oh, I am sorry, were you using that?
|
||||
AI << "<span class='warning'>Pilot detected! Forced ejection initiated!"
|
||||
occupant << "<span class='danger'>You have been forcibly ejected!</span>"
|
||||
to_chat(AI, "<span class='warning'>Pilot detected! Forced ejection initiated!")
|
||||
to_chat(occupant, "<span class='danger'>You have been forcibly ejected!</span>")
|
||||
go_out(1) //IT IS MINE, NOW. SUCK IT, RD!
|
||||
ai_enter_mech(AI, interaction)
|
||||
|
||||
if(AI_TRANS_FROM_CARD) //Using an AI card to upload to a mech.
|
||||
AI = card.AI
|
||||
if(!AI)
|
||||
user << "<span class='warning'>There is no AI currently installed on this device.</span>"
|
||||
to_chat(user, "<span class='warning'>There is no AI currently installed on this device.</span>")
|
||||
return
|
||||
else if(AI.stat || !AI.client)
|
||||
user << "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>"
|
||||
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
|
||||
return
|
||||
else if(occupant || dna_lock) //Normal AIs cannot steal mechs!
|
||||
user << "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"]."
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].")
|
||||
return
|
||||
AI.control_disabled = 0
|
||||
AI.radio_enabled = 1
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
to_chat(user, "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.")
|
||||
card.AI = null
|
||||
ai_enter_mech(AI, interaction)
|
||||
|
||||
@@ -713,9 +712,9 @@
|
||||
AI.remote_control = src
|
||||
AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
||||
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
|
||||
AI << "[AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" \
|
||||
: "<span class='notice'>You have been uploaded to a mech's onboard computer."]"
|
||||
AI << "<span class='reallybig boldnotice'>Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.</span>"
|
||||
to_chat(AI, "[AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" \
|
||||
: "<span class='notice'>You have been uploaded to a mech's onboard computer."]")
|
||||
to_chat(AI, "<span class='reallybig boldnotice'>Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.</span>")
|
||||
GrantActions(AI, !AI.can_dominate_mechs)
|
||||
|
||||
|
||||
@@ -805,7 +804,7 @@
|
||||
return
|
||||
log_message("[user] tries to move in.")
|
||||
if (occupant)
|
||||
usr << "<span class='warning'>The [name] is already occupied!</span>"
|
||||
to_chat(usr, "<span class='warning'>The [name] is already occupied!</span>")
|
||||
log_append_to_last("Permission denied.")
|
||||
return
|
||||
var/passed
|
||||
@@ -817,32 +816,32 @@
|
||||
else if(operation_allowed(user))
|
||||
passed = 1
|
||||
if(!passed)
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
log_append_to_last("Permission denied.")
|
||||
return
|
||||
if(user.buckled)
|
||||
user << "<span class='warning'>You are currently buckled and cannot move.</span>"
|
||||
to_chat(user, "<span class='warning'>You are currently buckled and cannot move.</span>")
|
||||
log_append_to_last("Permission denied.")
|
||||
return
|
||||
if(user.has_buckled_mobs()) //mob attached to us
|
||||
user << "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>")
|
||||
return
|
||||
|
||||
visible_message("[user] starts to climb into [name].")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(obj_integrity <= 0)
|
||||
user << "<span class='warning'>You cannot get in the [name], it has been destroyed!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot get in the [name], it has been destroyed!</span>")
|
||||
else if(occupant)
|
||||
user << "<span class='danger'>[occupant] was faster! Try better next time, loser.</span>"
|
||||
to_chat(user, "<span class='danger'>[occupant] was faster! Try better next time, loser.</span>")
|
||||
else if(user.buckled)
|
||||
user << "<span class='warning'>You can't enter the exosuit while buckled.</span>"
|
||||
to_chat(user, "<span class='warning'>You can't enter the exosuit while buckled.</span>")
|
||||
else if(user.has_buckled_mobs())
|
||||
user << "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't enter the exosuit with other creatures attached to you!</span>")
|
||||
else
|
||||
moved_inside(user)
|
||||
else
|
||||
user << "<span class='warning'>You stop entering the exosuit!</span>"
|
||||
to_chat(user, "<span class='warning'>You stop entering the exosuit!</span>")
|
||||
return
|
||||
|
||||
/obj/mecha/proc/moved_inside(mob/living/carbon/human/H)
|
||||
@@ -864,16 +863,16 @@
|
||||
|
||||
/obj/mecha/proc/mmi_move_inside(obj/item/device/mmi/mmi_as_oc, mob/user)
|
||||
if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
|
||||
user << "<span class='warning'>Consciousness matrix not detected!</span>"
|
||||
to_chat(user, "<span class='warning'>Consciousness matrix not detected!</span>")
|
||||
return FALSE
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "<span class='warning'>Beta-rhythm below acceptable level!</span>"
|
||||
to_chat(user, "<span class='warning'>Beta-rhythm below acceptable level!</span>")
|
||||
return FALSE
|
||||
else if(occupant)
|
||||
user << "<span class='warning'>Occupant detected!</span>"
|
||||
to_chat(user, "<span class='warning'>Occupant detected!</span>")
|
||||
return FALSE
|
||||
else if(dna_lock && (!mmi_as_oc.brainmob.stored_dna || (dna_lock != mmi_as_oc.brainmob.stored_dna.unique_enzymes)))
|
||||
user << "<span class='warning'>Access denied. [name] is secured with a DNA lock.</span>"
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is secured with a DNA lock.</span>")
|
||||
return FALSE
|
||||
|
||||
visible_message("<span class='notice'>[user] starts to insert an MMI into [name].</span>")
|
||||
@@ -882,22 +881,22 @@
|
||||
if(!occupant)
|
||||
return mmi_moved_inside(mmi_as_oc, user)
|
||||
else
|
||||
user << "<span class='warning'>Occupant detected!</span>"
|
||||
to_chat(user, "<span class='warning'>Occupant detected!</span>")
|
||||
else
|
||||
user << "<span class='notice'>You stop inserting the MMI.</span>"
|
||||
to_chat(user, "<span class='notice'>You stop inserting the MMI.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/mecha/proc/mmi_moved_inside(obj/item/device/mmi/mmi_as_oc, mob/user)
|
||||
if(!(Adjacent(mmi_as_oc) && Adjacent(user)))
|
||||
return FALSE
|
||||
if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
|
||||
user << "<span class='notice'>Consciousness matrix not detected!</span>"
|
||||
to_chat(user, "<span class='notice'>Consciousness matrix not detected!</span>")
|
||||
return FALSE
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "<span class='warning'>Beta-rhythm below acceptable level!</span>"
|
||||
to_chat(user, "<span class='warning'>Beta-rhythm below acceptable level!</span>")
|
||||
return FALSE
|
||||
if(!user.transferItemToLoc(mmi_as_oc, src))
|
||||
user << "<span class='warning'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>\the [mmi_as_oc] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return FALSE
|
||||
var/mob/brainmob = mmi_as_oc.brainmob
|
||||
mmi_as_oc.mecha = src
|
||||
@@ -945,10 +944,10 @@
|
||||
return
|
||||
else
|
||||
if(!AI.linked_core)
|
||||
AI << "<span class='userdanger'>Inactive core destroyed. Unable to return.</span>"
|
||||
to_chat(AI, "<span class='userdanger'>Inactive core destroyed. Unable to return.</span>")
|
||||
AI.linked_core = null
|
||||
return
|
||||
AI << "<span class='notice'>Returning to core...</span>"
|
||||
to_chat(AI, "<span class='notice'>Returning to core...</span>")
|
||||
AI.controlled_mech = null
|
||||
AI.remote_control = null
|
||||
RemoveActions(occupant, 1)
|
||||
@@ -1001,7 +1000,7 @@
|
||||
/obj/mecha/proc/occupant_message(message as text)
|
||||
if(message)
|
||||
if(occupant && occupant.client)
|
||||
occupant << "\icon[src] [message]"
|
||||
to_chat(occupant, "\icon[src] [message]")
|
||||
return
|
||||
|
||||
/obj/mecha/proc/log_message(message as text,red=null)
|
||||
|
||||
@@ -106,10 +106,10 @@
|
||||
return
|
||||
chassis.lights = !chassis.lights
|
||||
if(chassis.lights)
|
||||
chassis.AddLuminosity(chassis.lights_power)
|
||||
chassis.set_light(chassis.lights_power)
|
||||
button_icon_state = "mech_lights_on"
|
||||
else
|
||||
chassis.AddLuminosity(-chassis.lights_power)
|
||||
chassis.set_light(-chassis.lights_power)
|
||||
button_icon_state = "mech_lights_off"
|
||||
chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
chassis.log_message("Toggled lights [chassis.lights?"on":"off"].")
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
if(C.use(4))
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else
|
||||
user << ("<span class='warning'>There's not enough cable to finish the task!</span>")
|
||||
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task!</span>"))
|
||||
return 0
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.get_amount() < 5)
|
||||
user << ("<span class='warning'>There's not enough material in this stack!</span>")
|
||||
to_chat(user, ("<span class='warning'>There's not enough material in this stack!</span>"))
|
||||
return 0
|
||||
else
|
||||
S.use(5)
|
||||
@@ -61,12 +61,12 @@
|
||||
if (C.use(4))
|
||||
playsound(holder, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
else
|
||||
user << ("<span class='warning'>There's not enough cable to finish the task!</span>")
|
||||
to_chat(user, ("<span class='warning'>There's not enough cable to finish the task!</span>"))
|
||||
return 0
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.get_amount() < 5)
|
||||
user << ("<span class='warning'>There's not enough material in this stack!</span>")
|
||||
to_chat(user, ("<span class='warning'>There's not enough material in this stack!</span>"))
|
||||
return 0
|
||||
else
|
||||
S.use(5)
|
||||
@@ -562,7 +562,7 @@
|
||||
|
||||
/datum/construction/reversible/mecha/gygax/spawn_result()
|
||||
var/obj/mecha/combat/gygax/M = new result(get_turf(holder))
|
||||
M.CheckParts(holder)
|
||||
M.CheckParts(holder.contents)
|
||||
qdel(holder)
|
||||
feedback_inc("mecha_gygax_created",1)
|
||||
return
|
||||
@@ -1147,7 +1147,7 @@
|
||||
|
||||
/datum/construction/reversible/mecha/durand/spawn_result()
|
||||
var/obj/mecha/combat/gygax/M = new result(get_turf(holder))
|
||||
M.CheckParts(holder)
|
||||
M.CheckParts(holder.contents)
|
||||
qdel(holder)
|
||||
feedback_inc("mecha_durand_created",1)
|
||||
return
|
||||
@@ -1479,7 +1479,7 @@
|
||||
|
||||
/datum/construction/reversible/mecha/phazon/spawn_result()
|
||||
var/obj/mecha/combat/gygax/M = new result(get_turf(holder))
|
||||
M.CheckParts(holder)
|
||||
M.CheckParts(holder.contents)
|
||||
qdel(holder)
|
||||
feedback_inc("mecha_phazon_created",1)
|
||||
return
|
||||
|
||||
@@ -152,9 +152,9 @@
|
||||
|
||||
if(istype(W, /obj/item/device/mmi))
|
||||
if(mmi_move_inside(W,user))
|
||||
user << "[src]-[W] interface initialized successfully."
|
||||
to_chat(user, "[src]-[W] interface initialized successfully.")
|
||||
else
|
||||
user << "[src]-[W] interface initialization failed."
|
||||
to_chat(user, "[src]-[W] interface initialization failed.")
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
@@ -166,7 +166,7 @@
|
||||
E.attach(src)
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You were unable to attach [W] to [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You were unable to attach [W] to [src]!</span>")
|
||||
return
|
||||
if(W.GetID())
|
||||
if(add_req_access || maint_access)
|
||||
@@ -180,48 +180,48 @@
|
||||
output_maintenance_dialog(id_card, user)
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>Invalid ID: Access denied.</span>"
|
||||
to_chat(user, "<span class='warning'>Invalid ID: Access denied.</span>")
|
||||
else
|
||||
user << "<span class='warning'>Maintenance protocols disabled by operator.</span>"
|
||||
to_chat(user, "<span class='warning'>Maintenance protocols disabled by operator.</span>")
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(state==1)
|
||||
state = 2
|
||||
user << "<span class='notice'>You undo the securing bolts.</span>"
|
||||
to_chat(user, "<span class='notice'>You undo the securing bolts.</span>")
|
||||
else if(state==2)
|
||||
state = 1
|
||||
user << "<span class='notice'>You tighten the securing bolts.</span>"
|
||||
to_chat(user, "<span class='notice'>You tighten the securing bolts.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(state==2)
|
||||
state = 3
|
||||
user << "<span class='notice'>You open the hatch to the power unit.</span>"
|
||||
to_chat(user, "<span class='notice'>You open the hatch to the power unit.</span>")
|
||||
else if(state==3)
|
||||
state=2
|
||||
user << "<span class='notice'>You close the hatch to the power unit.</span>"
|
||||
to_chat(user, "<span class='notice'>You close the hatch to the power unit.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
if(state == 3 && (internal_damage & MECHA_INT_SHORT_CIRCUIT))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.use(2))
|
||||
clearInternalDamage(MECHA_INT_SHORT_CIRCUIT)
|
||||
user << "<span class='notice'>You replace the fused wires.</span>"
|
||||
to_chat(user, "<span class='notice'>You replace the fused wires.</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need two lengths of cable to fix this mech!</span>"
|
||||
to_chat(user, "<span class='warning'>You need two lengths of cable to fix this mech!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && user.a_intent != INTENT_HARM)
|
||||
if(internal_damage & MECHA_INT_TEMP_CONTROL)
|
||||
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
|
||||
user << "<span class='notice'>You repair the damaged temperature controller.</span>"
|
||||
to_chat(user, "<span class='notice'>You repair the damaged temperature controller.</span>")
|
||||
else if(state==3 && cell)
|
||||
cell_power_remaining = max(0.1, cell.charge/cell.maxcharge) //10% charge or whatever is remaining in the current cell
|
||||
cell.forceMove(loc)
|
||||
cell = null
|
||||
state = 4
|
||||
user << "<span class='notice'>You unscrew and pry out the powercell.</span>"
|
||||
to_chat(user, "<span class='notice'>You unscrew and pry out the powercell.</span>")
|
||||
log_message("Powercell removed")
|
||||
else if(state==4 && cell)
|
||||
state=3
|
||||
user << "<span class='notice'>You screw the cell in place.</span>"
|
||||
to_chat(user, "<span class='notice'>You screw the cell in place.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
@@ -230,13 +230,13 @@
|
||||
if(!user.drop_item())
|
||||
return
|
||||
var/obj/item/weapon/stock_parts/cell/C = W
|
||||
user << "<span class='notice'>You install the powercell.</span>"
|
||||
to_chat(user, "<span class='notice'>You install the powercell.</span>")
|
||||
C.forceMove(src)
|
||||
C.use(max(0, C.charge - C.maxcharge*cell_power_remaining)) //Set inserted cell's power to saved percentage if that's higher
|
||||
cell = C
|
||||
log_message("Powercell installed")
|
||||
else
|
||||
user << "<span class='notice'>There's already a powercell installed.</span>"
|
||||
to_chat(user, "<span class='notice'>There's already a powercell installed.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
@@ -246,20 +246,20 @@
|
||||
if (WT.remove_fuel(0,user))
|
||||
if (internal_damage & MECHA_INT_TANK_BREACH)
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
user << "<span class='notice'>You repair the damaged gas tank.</span>"
|
||||
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>")
|
||||
obj_integrity += min(10, max_integrity-obj_integrity)
|
||||
else
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
return 1
|
||||
else
|
||||
user << "<span class='warning'>The [name] is at full integrity!</span>"
|
||||
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")
|
||||
return 1
|
||||
|
||||
else if(istype(W, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
user << "<span class='warning'>\the [W] is stuck to your hand, you cannot put it in \the [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>\the [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
trackers += W
|
||||
user.visible_message("[user] attaches [W] to [src].", "<span class='notice'>You attach [W] to [src].</span>")
|
||||
|
||||
@@ -228,10 +228,10 @@
|
||||
if(user)
|
||||
if(state==0)
|
||||
state = 1
|
||||
user << "The securing bolts are now exposed."
|
||||
to_chat(user, "The securing bolts are now exposed.")
|
||||
else if(state==1)
|
||||
state = 0
|
||||
user << "The securing bolts are now hidden."
|
||||
to_chat(user, "The securing bolts are now hidden.")
|
||||
output_maintenance_dialog(filter.getObj("id_card"),user)
|
||||
|
||||
if(href_list["set_internal_tank_valve"] && state >=1)
|
||||
@@ -240,7 +240,7 @@
|
||||
var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num
|
||||
if(new_pressure)
|
||||
internal_tank_valve = new_pressure
|
||||
user << "The internal pressure valve has been set to [internal_tank_valve]kPa."
|
||||
to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.")
|
||||
|
||||
if(href_list["add_req_access"] && add_req_access && filter.getObj("id_card"))
|
||||
operation_req_access += filter.getNum("add_req_access")
|
||||
@@ -308,7 +308,7 @@
|
||||
|
||||
if(href_list["dna_lock"])
|
||||
if(occupant && !iscarbon(occupant))
|
||||
occupant << "<span class='danger'> You do not have any DNA!</span>"
|
||||
to_chat(occupant, "<span class='danger'> You do not have any DNA!</span>")
|
||||
return
|
||||
dna_lock = occupant.dna.unique_enzymes
|
||||
occupant_message("You feel a prick as the needle takes your DNA sample.")
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
/obj/structure/mecha_wreckage/examine(mob/user)
|
||||
..()
|
||||
if(AI)
|
||||
user << "<span class='notice'>The AI recovery beacon is active.</span>"
|
||||
to_chat(user, "<span class='notice'>The AI recovery beacon is active.</span>")
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
if(salvage_num <= 0)
|
||||
user << "<span class='warning'>You don't see anything that can be cut with [I]!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(welder_salvage && welder_salvage.len && WT.remove_fuel(0, user))
|
||||
@@ -47,13 +47,13 @@
|
||||
welder_salvage -= type
|
||||
salvage_num--
|
||||
else
|
||||
user << "<span class='warning'>You fail to salvage anything valuable from [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
else
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wirecutters))
|
||||
if(salvage_num <= 0)
|
||||
user << "<span class='warning'>You don't see anything that can be cut with [I]!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be cut with [I]!</span>")
|
||||
return
|
||||
else if(wirecutters_salvage && wirecutters_salvage.len)
|
||||
var/type = prob(70) ? pick(wirecutters_salvage) : null
|
||||
@@ -62,7 +62,7 @@
|
||||
user.visible_message("[user] cuts [N] from [src].", "<span class='notice'>You cut [N] from [src].</span>")
|
||||
salvage_num--
|
||||
else
|
||||
user << "<span class='warning'>You fail to salvage anything valuable from [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to salvage anything valuable from [src]!</span>")
|
||||
|
||||
else if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(crowbar_salvage && crowbar_salvage.len)
|
||||
@@ -73,7 +73,7 @@
|
||||
user.visible_message("[user] pries [S] from [src].", "<span class='notice'>You pry [S] from [src].</span>")
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>You don't see anything that can be pried with [I]!</span>"
|
||||
to_chat(user, "<span class='warning'>You don't see anything that can be pried with [I]!</span>")
|
||||
|
||||
|
||||
/obj/structure/mecha_wreckage/transfer_ai(interaction, mob/user, null, obj/item/device/aicard/card)
|
||||
@@ -83,16 +83,16 @@
|
||||
//Proc called on the wreck by the AI card.
|
||||
if(interaction == AI_TRANS_TO_CARD) //AIs can only be transferred in one direction, from the wreck to the card.
|
||||
if(!AI) //No AI in the wreck
|
||||
user << "<span class='warning'>No AI backups found.</span>"
|
||||
to_chat(user, "<span class='warning'>No AI backups found.</span>")
|
||||
return
|
||||
cut_overlays() //Remove the recovery beacon overlay
|
||||
AI.forceMove(card) //Move the dead AI to the card.
|
||||
card.AI = AI
|
||||
if(AI.client) //AI player is still in the dead AI and is connected
|
||||
AI << "The remains of your file system have been recovered on a mobile storage device."
|
||||
to_chat(AI, "The remains of your file system have been recovered on a mobile storage device.")
|
||||
else //Give the AI a heads-up that it is probably going to get fixed.
|
||||
AI.notify_ghost_cloning("You have been recovered from the wreckage!", source = card)
|
||||
user << "<span class='boldnotice'>Backup files recovered</span>: [AI.name] ([rand(1000,9999)].exe) salvaged from [name] and stored within local memory."
|
||||
to_chat(user, "<span class='boldnotice'>Backup files recovered</span>: [AI.name] ([rand(1000,9999)].exe) salvaged from [name] and stored within local memory.")
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -165,13 +165,13 @@
|
||||
drill.equip_cooldown = initial(drill.equip_cooldown)
|
||||
|
||||
/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O)
|
||||
user << "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You lean on the back of [O] and start pushing so it falls out of [src].</span>")
|
||||
if(do_after(user, 300, target = O))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src )
|
||||
return
|
||||
user << "<span class='notice'>You successfully pushed [O] out of [src]!</span>"
|
||||
to_chat(user, "<span class='notice'>You successfully pushed [O] out of [src]!</span>")
|
||||
O.loc = loc
|
||||
cargo -= O
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
user << "<span class='warning'>You fail to push [O] out of [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You fail to push [O] out of [src]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user