Added jetpack, added gear, fleshed out ERT hardsuits.

This commit is contained in:
Zuhayr
2014-11-15 17:39:44 +10:30
parent f7cabb03c8
commit ae66fb16d3
26 changed files with 741 additions and 354 deletions

View File

@@ -808,6 +808,7 @@
#include "code\modules\clothing\spacesuits\rig\modules\vision.dm" #include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
#include "code\modules\clothing\spacesuits\rig\suits\ert.dm" #include "code\modules\clothing\spacesuits\rig\suits\ert.dm"
#include "code\modules\clothing\spacesuits\rig\suits\hacker.dm" #include "code\modules\clothing\spacesuits\rig\suits\hacker.dm"
#include "code\modules\clothing\spacesuits\rig\suits\industrial.dm"
#include "code\modules\clothing\spacesuits\rig\suits\light.dm" #include "code\modules\clothing\spacesuits\rig\suits\light.dm"
#include "code\modules\clothing\spacesuits\rig\suits\ninja.dm" #include "code\modules\clothing\spacesuits\rig\suits\ninja.dm"
#include "code\modules\clothing\spacesuits\rig\suits\stealth.dm" #include "code\modules\clothing\spacesuits\rig\suits\stealth.dm"

View File

@@ -272,28 +272,35 @@
if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT)) if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT))
var/mob/living/carbon/human/H = C var/mob/living/carbon/human/H = C
if(!(H.head && H.head.flags & AIRTIGHT)) if(!(H.head && H.head.flags & AIRTIGHT))
C << "<span class='notice'>You are not wearing a mask.</span>"
no_mask = 1 no_mask = 1
if(no_mask) if(no_mask)
C << "<span class='notice'>You are not wearing a suitable mask or helmet.</span>"
return 1 return 1
else else
var/list/nicename = null var/list/nicename = null
var/list/tankcheck = null var/list/tankcheck = null
var/breathes = "oxygen" //default, we'll check later var/breathes = "oxygen" //default, we'll check later
var/list/contents = list() var/list/contents = list()
var/from = "on"
if(ishuman(C)) if(ishuman(C))
var/mob/living/carbon/human/H = C var/mob/living/carbon/human/H = C
breathes = H.species.breath_type breathes = H.species.breath_type
nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket") nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store) tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
else else
nicename = list("right hand", "left hand", "back")
nicename = list("Right Hand", "Left Hand", "Back")
tankcheck = list(C.r_hand, C.l_hand, C.back) tankcheck = list(C.r_hand, C.l_hand, C.back)
// Rigs are a fucking pain since they keep an air tank in nullspace.
if(istype(C.back,/obj/item/weapon/storage/rig))
var/obj/item/weapon/storage/rig/rig = C.back
if(rig.air_supply)
from = "in"
nicename |= "hardsuit"
tankcheck |= rig.air_supply
for(var/i=1, i<tankcheck.len+1, ++i) for(var/i=1, i<tankcheck.len+1, ++i)
if(istype(tankcheck[i], /obj/item/weapon/tank)) if(istype(tankcheck[i], /obj/item/weapon/tank))
var/obj/item/weapon/tank/t = tankcheck[i] var/obj/item/weapon/tank/t = tankcheck[i]
@@ -342,7 +349,7 @@
//We've determined the best container now we set it as our internals //We've determined the best container now we set it as our internals
if(best) if(best)
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] on your [nicename[best]].</span>" C << "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>"
C.internal = tankcheck[best] C.internal = tankcheck[best]

View File

@@ -128,7 +128,7 @@
/obj/machinery/door/bullet_act(var/obj/item/projectile/Proj) /obj/machinery/door/bullet_act(var/obj/item/projectile/Proj)
..() ..()
//Tasers and the like should not damage doors. //Tasers and the like should not damage doors.
if(Proj.damage_type == HALLOSS) if(Proj.damage_type == HALLOSS)
return return
@@ -191,7 +191,8 @@
open() open()
operating = -1 operating = -1
return 1 return 1
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card)) //psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == "hurt" && !istype(I, /obj/item/weapon/card))
var/obj/item/weapon/W = I var/obj/item/weapon/W = I
if(W.damtype == BRUTE || W.damtype == BURN) if(W.damtype == BRUTE || W.damtype == BURN)
if(W.force < min_force) if(W.force < min_force)

View File

@@ -1,12 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 //Contains the rapid construction device.
/*
CONTAINS:
RCD
*/
/obj/item/weapon/rcd /obj/item/weapon/rcd
name = "rapid-construction-device (RCD)" name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build walls/floor." desc = "A device used to rapidly build walls and floors."
icon = 'icons/obj/items.dmi' icon = 'icons/obj/items.dmi'
icon_state = "rcd" icon_state = "rcd"
opacity = 0 opacity = 0
@@ -24,167 +19,121 @@ RCD
var/stored_matter = 0 var/stored_matter = 0
var/working = 0 var/working = 0
var/mode = 1 var/mode = 1
var/list/modes = list("Floor & Walls","Airlock","Deconstruct")
var/canRwall = 0 var/canRwall = 0
var/disabled = 0 var/disabled = 0
/obj/item/weapon/rcd/examine()
..()
if(src.type == /obj/item/weapon/rcd && loc == usr)
usr << "It currently holds [stored_matter]/30 matter-units."
New() /obj/item/weapon/rcd/New()
desc = "A RCD. It currently holds [stored_matter]/30 matter-units." ..()
src.spark_system = new /datum/effect/effect/system/spark_spread src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src) spark_system.set_up(5, 0, src)
spark_system.attach(src) spark_system.attach(src)
return
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
attackby(obj/item/weapon/W, mob/user) if(istype(W, /obj/item/weapon/rcd_ammo))
..() if((stored_matter + 10) > 30)
if(istype(W, /obj/item/weapon/rcd_ammo)) user << "<span class='notice'>The RCD can't hold any more matter-units.</span>"
if((stored_matter + 10) > 30)
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
return
user.drop_item()
del(W)
stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return return
user.drop_from_inventory(W)
del(W)
stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
return
..()
/obj/item/weapon/rcd/attack_self(mob/user)
//Change the mode
if(++mode > 3) mode = 1
user << "<span class='notice'>Changed mode to '[modes[mode]]'</span>"
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
if(prob(20)) src.spark_system.start()
attack_self(mob/user) /obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
//Change the mode if(!proximity) return
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) if(disabled && !isrobot(user))
switch(mode) return 0
if(1) if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
mode = 2 return 0
user << "<span class='notice'>Changed mode to 'Airlock'</span>" return alter_turf(A,user,(mode == 3))
if(prob(20))
src.spark_system.start()
return
if(2)
mode = 3
user << "<span class='notice'>Changed mode to 'Deconstruct'</span>"
if(prob(20))
src.spark_system.start()
return
if(3)
mode = 1
user << "<span class='notice'>Changed mode to 'Floor & Walls'</span>"
if(prob(20))
src.spark_system.start()
return
proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(disabled && !isrobot(user))
return 0
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
return 0
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
return 0
switch(mode)
if(1)
if(istype(A, /turf/space))
if(useResource(1, user))
user << "Building Floor..."
activate()
A:ChangeTurf(/turf/simulated/floor/plating/airless)
return 1
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(3, user))
user << "Building Wall ..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20))
if(!useResource(3, user)) return 0
activate()
A:ChangeTurf(/turf/simulated/wall)
return 1
return 0
if(2)
if(istype(A, /turf/simulated/floor))
if(checkResource(10, user))
user << "Building Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
T.autoclose = 1
return 1
return 0
return 0
if(3)
if(istype(A, /turf/simulated/wall))
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
return 0
if(checkResource(5, user))
user << "Deconstructing Wall..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40))
if(!useResource(5, user)) return 0
activate()
A:ChangeTurf(/turf/simulated/floor/plating/airless)
return 1
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(5, user))
user << "Deconstructing Floor..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(5, user)) return 0
activate()
A:ChangeTurf(/turf/space)
return 1
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(10, user))
user << "Deconstructing Airlock..."
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50))
if(!useResource(10, user)) return 0
activate()
del(A)
return 1
return 0
return 0
else
user << "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin."
return 0
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user) /obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
if(stored_matter < amount) if(stored_matter < amount)
return 0 return 0
stored_matter -= amount stored_matter -= amount
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return 1 return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user) /obj/item/weapon/rcd/proc/alter_turf(var/turf/T,var/mob/user,var/deconstruct)
return stored_matter >= amount
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
return user:cell:use(amount * 30)
/obj/item/weapon/rcd/borg/checkResource(var/amount, var/mob/user) var/build_cost = 0
if(!isrobot(user)) var/build_type
return 0 var/build_turf
return user:cell:charge >= (amount * 30) var/build_delay
var/build_other
/obj/item/weapon/rcd/borg/New() if(working == 1)
..() return 0
desc = "A device used to rapidly build walls/floor."
canRwall = 1 if(mode == 3 && istype(T,/obj/machinery/door/airlock))
build_cost = 10
build_delay = 50
build_type = "airlock"
else if(mode == 2 && !deconstruct && istype(T,/turf/simulated/floor))
build_cost = 10
build_delay = 50
build_type = "airlock"
build_other = /obj/machinery/door/airlock
else if(!deconstruct && istype(T,/turf/space))
build_cost = 1
build_type = "floor"
build_turf = /turf/simulated/floor/plating/airless
else if(deconstruct && istype(T,/turf/simulated/wall))
build_delay = deconstruct ? 50 : 40
build_cost = 5
build_type = (canRwall && istype(T,/turf/simulated/wall/r_wall)) ? "wall" : null
build_turf = /turf/simulated/floor
else if(istype(T,/turf/simulated/floor))
build_delay = deconstruct ? 50 : 20
build_cost = deconstruct ? 10 : 3
build_type = deconstruct ? "floor" : "wall"
build_turf = deconstruct ? /turf/space : /turf/simulated/wall
else
return 0
if(!build_type)
working = 0
return 0
if(!useResource(build_cost, user))
user << "Insufficient resources."
return 0
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
working = 1
user << "[(deconstruct ? "Deconstructing" : "Building")] [build_type]..."
if(build_delay && !do_after(user, build_delay))
working = 0
return 0
working = 0
if(build_turf)
T.ChangeTurf(build_turf)
else if(build_other)
new build_other(T)
else
del(T)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
return 1
/obj/item/weapon/rcd_ammo /obj/item/weapon/rcd_ammo
name = "compressed matter cartridge" name = "compressed matter cartridge"
@@ -196,4 +145,33 @@ RCD
density = 0 density = 0
anchored = 0.0 anchored = 0.0
origin_tech = "materials=2" origin_tech = "materials=2"
matter = list("metal" = 30000,"glass" = 15000) matter = list("metal" = 30000,"glass" = 15000)
/obj/item/weapon/rcd/borg
canRwall = 1
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(R.cell)
var/cost = amount*30
if(R.cell.charge >= cost)
R.cell.use(cost)
return 1
return 0
/obj/item/weapon/rcd/borg/attackby()
return
/obj/item/weapon/rcd/mounted/useResource(var/amount, var/mob/user)
var/cost = amount*30
if(istype(loc,/obj/item/rig_module))
var/obj/item/rig_module/module = loc
if(module.holder && module.holder.cell)
if(module.holder.cell.charge >= cost)
module.holder.cell.use(cost)
return 1
return 0
/obj/item/weapon/rcd/mounted/attackby()
return

View File

@@ -75,6 +75,7 @@
/obj/item/weapon/storage/lockbox, /obj/item/weapon/storage/lockbox,
/obj/item/weapon/storage/secure, /obj/item/weapon/storage/secure,
/obj/item/weapon/circuitboard, /obj/item/weapon/circuitboard,
/obj/item/weapon/storage/rig,
/obj/item/device/eftpos, /obj/item/device/eftpos,
/obj/item/device/lightreplacer, /obj/item/device/lightreplacer,
/obj/item/device/taperecorder, /obj/item/device/taperecorder,

View File

@@ -21,7 +21,7 @@
/obj/item/weapon/tank/jetpack/examine(mob/user) /obj/item/weapon/tank/jetpack/examine(mob/user)
if(!..(user, 0)) if(!..(user, 0))
return return
if(air_contents.gas["oxygen"] < 10) if(air_contents.gas["oxygen"] < 10)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>") user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(user, 'sound/effects/alert.ogg', 50, 1) playsound(user, 'sound/effects/alert.ogg', 50, 1)
@@ -48,6 +48,8 @@
var/mob/M = usr var/mob/M = usr
M.update_inv_back() M.update_inv_back()
usr << "You toggle the thrusters [on? "on":"off"]."
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob) /obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob)
if(!(src.on)) if(!(src.on))
return 0 return 0
@@ -108,8 +110,38 @@
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user) /obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
if(!..(0)) if(!..(0))
return return
if(air_contents.gas["carbon_dioxide"] < 10) if(air_contents.gas["carbon_dioxide"] < 10)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of carbon dioxide!</B>") user << text("\red <B>The meter on the [src.name] indicates you are almost out of carbon dioxide!</B>")
playsound(user, 'sound/effects/alert.ogg', 50, 1) playsound(user, 'sound/effects/alert.ogg', 50, 1)
return return
/obj/item/weapon/tank/jetpack/rig
name = "jetpack"
var/obj/item/weapon/storage/rig/holder
/obj/item/weapon/tank/jetpack/rig/examine()
usr << "It's a jetpack. If you can see this, report it on the bug tracker."
return 0
/obj/item/weapon/tank/jetpack/rig/allow_thrust(num, mob/living/user as mob)
if(!(src.on))
return 0
if(!istype(holder) || !holder.air_supply)
return 0
var/obj/item/weapon/tank/pressure_vessel = holder.air_supply
if((num < 0.005 || pressure_vessel.air_contents.total_moles < num))
src.ion_trail.stop()
return 0
var/datum/gas_mixture/G = pressure_vessel.air_contents.remove(num)
var/allgases = G.gas["carbon_dioxide"] + G.gas["nitrogen"] + G.gas["oxygen"] + G.gas["phoron"]
if(allgases >= 0.005)
return 1
del(G)
return

View File

@@ -334,13 +334,14 @@
else if(response == "Dismantle") else if(response == "Dismantle")
user << "<span class='notice'>You begin slicing through the outer plating.</span>" user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1) playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(!do_after(user,100))
sleep(100) return
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return if(WT.isOn())
if( user.loc == T && user.get_active_hand() == WT )
user << "<span class='notice'>You remove the outer plating.</span>" user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall() dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return
return return
else else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>" user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
@@ -351,16 +352,17 @@
user << "<span class='notice'>You begin slicing through the outer plating.</span>" user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1) playsound(src, 'sound/items/Welder.ogg', 100, 1)
sleep(60) var/delay = 60
if(mineral == "diamond")//Oh look, it's tougher if(mineral == "diamond")
sleep(60) delay += 60
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( user.loc == T && user.get_active_hand() == W ) if(!do_after(user,delay))
user << "<span class='notice'>You remove the outer plating.</span>" return
dismantle_wall()
for(var/mob/O in viewers(user, 5)) user << "<span class='notice'>You remove the outer plating.</span>"
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2) dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return return
//DRILLING //DRILLING
@@ -368,16 +370,17 @@
user << "<span class='notice'>You begin to drill though the wall.</span>" user << "<span class='notice'>You begin to drill though the wall.</span>"
sleep(60) var/delay = 60
if(mineral == "diamond") if(mineral == "diamond")
sleep(60) delay += 60
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
if( user.loc == T && user.get_active_hand() == W ) if(!do_after(user,delay))
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>" return
dismantle_wall()
for(var/mob/O in viewers(user, 5)) user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2) dismantle_wall()
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
return return
else if( istype(W, /obj/item/weapon/melee/energy/blade) ) else if( istype(W, /obj/item/weapon/melee/energy/blade) )

View File

@@ -87,6 +87,8 @@
usable = 1 usable = 1
use_power_cost = 10 use_power_cost = 10
engage_string = "Configure"
interface_name = "mounted laser cannon" interface_name = "mounted laser cannon"
interface_desc = "A shoulder-mounted cell-powered laser cannon." interface_desc = "A shoulder-mounted cell-powered laser cannon."
@@ -114,6 +116,8 @@
name = "mounted taser" name = "mounted taser"
desc = "A shoulder-mounted energy projector." desc = "A shoulder-mounted energy projector."
usable = 0
suit_overlay_active = "mounted-taser" suit_overlay_active = "mounted-taser"
suit_overlay_inactive = "mounted-taser" suit_overlay_inactive = "mounted-taser"
@@ -127,6 +131,9 @@
name = "energy blade projector" name = "energy blade projector"
desc = "A powerful cutting beam projector." desc = "A powerful cutting beam projector."
activate_string = "Project Blade"
deactivate_string = "Cancel Blade"
interface_name = "spider fang blade" interface_name = "spider fang blade"
interface_desc = "A lethal energy projector that can shape a blade projected from the hand of the wearer or launch radioactive darts." interface_desc = "A lethal energy projector that can shape a blade projected from the hand of the wearer or launch radioactive darts."
@@ -183,6 +190,8 @@
usable = 1 usable = 1
use_power_cost = 15 use_power_cost = 15
engage_string = "Fabricate Star"
interface_name = "death blossom launcher" interface_name = "death blossom launcher"
interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity." interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity."

View File

@@ -15,6 +15,10 @@
disruptive = 0 disruptive = 0
activates_on_touch = 1 activates_on_touch = 1
engage_string = "Eject AI"
activate_string = "Enable Contact Dataspike"
deactivate_string = "Disable Contact Dataspike"
interface_name = "integrated intelligence system" interface_name = "integrated intelligence system"
interface_desc = "A socket that supports a range of artificial intelligence systems." interface_desc = "A socket that supports a range of artificial intelligence systems."
@@ -170,6 +174,9 @@
activates_on_touch = 1 activates_on_touch = 1
usable = 0 usable = 0
activate_string = "Enable Datajack"
deactivate_string = "Disable Datajack"
interface_name = "contact datajack" interface_name = "contact datajack"
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks." interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
var/list/stored_research var/list/stored_research
@@ -256,6 +263,9 @@
toggleable = 1 toggleable = 1
usable = 0 usable = 0
engage_string = "Enable Countermeasures"
deactivate_string = "Disable Countermeasures"
interface_name = "electrowarfare system" interface_name = "electrowarfare system"
interface_desc = "An active counter-electronic warfare suite that disrupts AI tracking." interface_desc = "An active counter-electronic warfare suite that disrupts AI tracking."
@@ -284,6 +294,9 @@
activates_on_touch = 1 activates_on_touch = 1
disruptive = 0 disruptive = 0
engage_string = "Enable Power Sink"
deactivate_string = "Disable Power Sink"
interface_name = "niling d-sink" interface_name = "niling d-sink"
interface_desc = "Colloquially known as a power siphon, this module drains power through the suit hands into the suit battery." interface_desc = "Colloquially known as a power siphon, this module drains power through the suit hands into the suit battery."

View File

@@ -42,11 +42,14 @@
var/suit_overlay var/suit_overlay
var/suit_overlay_active // If set, drawn over icon and mob when effect is active. var/suit_overlay_active // If set, drawn over icon and mob when effect is active.
var/suit_overlay_inactive // As above, inactive. var/suit_overlay_inactive // As above, inactive.
var/suit_overlay_used // As above, when engaged. TODO var/suit_overlay_used // As above, when engaged.
//Display fluff //Display fluff
var/interface_name = "hardsuit upgrade" var/interface_name = "hardsuit upgrade"
var/interface_desc = "A generic hardsuit upgrade." var/interface_desc = "A generic hardsuit upgrade."
var/engage_string = "Engage"
var/activate_string = "Activate"
var/deactivate_string = "Deactivate"
/obj/item/rig_module/New() /obj/item/rig_module/New()
..() ..()

View File

@@ -20,6 +20,9 @@
active_power_cost = 1 active_power_cost = 1
passive_power_cost = 0 passive_power_cost = 0
activate_string = "Enable Cloak"
deactivate_string = "Disable Cloak"
interface_name = "integrated stealth system" interface_name = "integrated stealth system"
interface_desc = "An integrated active camouflage system." interface_desc = "An integrated active camouflage system."
@@ -67,6 +70,8 @@
usable = 1 usable = 1
selectable = 1 selectable = 1
engage_string = "Emergency Leap"
interface_name = "VOID-shift phase projector" interface_name = "VOID-shift phase projector"
interface_desc = "An advanced teleportation system. It is capable of pinpoint precision or random leaps forward." interface_desc = "An advanced teleportation system. It is capable of pinpoint precision or random leaps forward."
@@ -124,6 +129,8 @@
interface_name = "energy net launcher" interface_name = "energy net launcher"
interface_desc = "An advanced energy-patterning projector used to capture targets." interface_desc = "An advanced energy-patterning projector used to capture targets."
engage_string = "Fabricate Net"
fabrication_type = /obj/item/weapon/energy_net fabrication_type = /obj/item/weapon/energy_net
use_power_cost = 70 use_power_cost = 70
@@ -143,6 +150,8 @@
active = 1 active = 1
permanent = 1 permanent = 1
engage_string = "Detonate"
interface_name = "dead man's switch" interface_name = "dead man's switch"
interface_desc = "An integrated self-destruct module. When the wearer dies, so does the surrounding area. Do not press this button." interface_desc = "An integrated self-destruct module. When the wearer dies, so does the surrounding area. Do not press this button."
@@ -163,4 +172,7 @@
engage() engage()
/obj/item/rig_module/self_destruct/engage() /obj/item/rig_module/self_destruct/engage()
explosion(get_turf(src), 0, 0, 3, 4) explosion(get_turf(src), 0, 0, 3, 4)
/obj/item/rig_module/self_destruct/small/engage()
explosion(get_turf(src), 0, 0, 1, 2)

View File

@@ -1,17 +1,98 @@
/* Contains: /* Contains:
* /obj/item/rig_module/device * /obj/item/rig_module/device
* /obj/item/rig_module/device/plasma_cutter * /obj/item/rig_module/device/plasmacutter
* /obj/item/rig_module/device/injector
* /obj/item/rig_module/device/healthscanner * /obj/item/rig_module/device/healthscanner
* /obj/item/rig_module/device/drill * /obj/item/rig_module/device/drill
* /obj/item/rig_module/device/orescanner * /obj/item/rig_module/device/orescanner
* /obj/item/rig_module/device/rcd
* /obj/item/rig_module/maneuvering_jets * /obj/item/rig_module/maneuvering_jets
* /obj/item/rig_module/foam_sprayer * /obj/item/rig_module/foam_sprayer
* /obj/item/rig_module/device/broadcaster * /obj/item/rig_module/device/broadcaster
* /obj/item/rig_module/chem_dispenser * /obj/item/rig_module/chem_dispenser
* /obj/item/rig_module/chem_dispenser/injector
* /obj/item/rig_module/voice * /obj/item/rig_module/voice
*/ */
/obj/item/rig_module/device
name = "mounted device"
desc = "Some kind of hardsuit mount."
usable = 0
selectable = 1
toggleable = 0
disruptive = 0
var/device_type
var/obj/item/device
/obj/item/rig_module/device/plasmacutter
name = "hardsuit plasma cutter"
desc = "A lethal-looking industrial cutter."
interface_name = "plasma cutter"
interface_desc = "A self-sustaining plasma arc capable of cutting through walls."
suit_overlay_active = "plasmacutter"
suit_overlay_inactive = "plasmacutter"
device_type = /obj/item/weapon/pickaxe/plasmacutter
/obj/item/rig_module/device/healthscanner
name = "health scanner module"
desc = "A hardsuit-mounted health scanner."
interface_name = "health scanner"
interface_desc = "Shows an informative health readout when used on a subject."
device_type = /obj/item/device/healthanalyzer
/obj/item/rig_module/device/drill
name = "hardsuit drill mount"
desc = "A very heavy diamond-tipped drill."
interface_name = "mounted drill"
interface_desc = "A diamond-tipped industrial drill."
suit_overlay_active = "mounted-drill"
suit_overlay_inactive = "mounted-drill"
device_type = /obj/item/weapon/pickaxe/diamonddrill
/obj/item/rig_module/device/orescanner
name = "ore scanner module"
desc = "A clunky old ore scanner."
interface_name = "ore detector"
interface_desc = "A sonar system for detecting large masses of ore."
engage_string = "Begin Scan"
usable = 1
selectable = 0
device_type = /obj/item/weapon/mining_scanner
/obj/item/rig_module/device/rcd
name = "RCD mount"
desc = "A cell-powered rapid construction device for a hardsuit."
interface_name = "mounted RCD"
interface_desc = "A device for building or removing walls. Cell-powered."
engage_string = "Configure RCD"
device_type = /obj/item/weapon/rcd/mounted
/obj/item/rig_module/device/New()
..()
if(device_type) device = new device_type(src)
/obj/item/rig_module/device/engage(atom/target)
if(!..() || !device)
return 0
if(!target)
device.attack_self(holder.wearer)
return 1
var/resolved = target.attackby(device,holder.wearer)
if(!resolved && device && target)
device.afterattack(target,holder.wearer,1)
return 1
/obj/item/rig_module/chem_dispenser /obj/item/rig_module/chem_dispenser
name = "mounted chemical dispenser" name = "mounted chemical dispenser"
desc = "A complex web of tubing and needles suitable for hardsuit use." desc = "A complex web of tubing and needles suitable for hardsuit use."
@@ -20,6 +101,8 @@
toggleable = 0 toggleable = 0
disruptive = 0 disruptive = 0
engage_string = "Inject"
interface_name = "integrated chemical dispenser" interface_name = "integrated chemical dispenser"
interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream." interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream."
@@ -131,6 +214,8 @@
toggleable = 0 toggleable = 0
disruptive = 0 disruptive = 0
engage_string = "Configure Synthesiser"
interface_name = "voice synthesiser" interface_name = "voice synthesiser"
interface_desc = "A flexible and powerful voice modulator system." interface_desc = "A flexible and powerful voice modulator system."
@@ -170,4 +255,69 @@
return 0 return 0
voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN)) voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
usr << "You are now mimicking <B>[voice_holder.voice]</B>.</font>" usr << "You are now mimicking <B>[voice_holder.voice]</B>.</font>"
return 1 return 1
/obj/item/rig_module/maneuvering_jets
name = "hardsuit maneuvering jets"
desc = "A compact gas thruster system for a hardsuit."
usable = 1
toggleable = 1
selectable = 0
disruptive = 0
engage_string = "Toggle Stabilizers"
activate_string = "Activate Thrusters"
deactivate_string = "Deactivate Thrusters"
interface_name = "maneuvering jets"
interface_desc = "An inbuilt EVA maneuvering system that runs off the rig air supply."
var/obj/item/weapon/tank/jetpack/rig/jets
/obj/item/rig_module/maneuvering_jets/engage()
if(!..())
return 0
jets.toggle_rockets()
return 1
/obj/item/rig_module/maneuvering_jets/activate()
if(active)
return 0
active = 1
spawn(1)
if(suit_overlay_active)
suit_overlay = suit_overlay_active
else
suit_overlay = null
holder.update_icon()
if(!jets.on)
jets.toggle()
return 1
/obj/item/rig_module/maneuvering_jets/deactivate()
if(!..())
return 0
if(jets.on)
jets.toggle()
return 1
/obj/item/rig_module/maneuvering_jets/New()
..()
jets = new(src)
/obj/item/rig_module/maneuvering_jets/installed()
..()
jets.holder = holder
jets.ion_trail.set_up(holder)
/obj/item/rig_module/maneuvering_jets/removed()
..()
jets.holder = null
jets.ion_trail.set_up(jets)
/obj/item/rig_module/foam_sprayer

View File

@@ -29,6 +29,10 @@
toggleable = 1 toggleable = 1
disruptive = 0 disruptive = 0
engage_string = "Cycle Visor Mode"
activate_string = "Enable Visor"
deactivate_string = "Disable Visor"
var/datum/rig_vision/vision var/datum/rig_vision/vision
var/list/vision_modes = list( var/list/vision_modes = list(
/datum/rig_vision/nvg, /datum/rig_vision/nvg,
@@ -38,6 +42,18 @@
var/vision_index var/vision_index
/obj/item/rig_module/vision/meson
name = "hardsuit meson scanner"
desc = "A layered, translucent visor system for a hardsuit."
usable = 0
interface_name = "meson scanner"
interface_desc = "An integrated meson scanner."
vision_modes = list(/datum/rig_vision/meson)
// There should only ever be one vision module installed in a suit. // There should only ever be one vision module installed in a suit.
/obj/item/rig_module/vision/installed() /obj/item/rig_module/vision/installed()
..() ..()
@@ -55,12 +71,15 @@
holder.wearer << "<font color='blue'>You activate your visual sensors.</font>" holder.wearer << "<font color='blue'>You activate your visual sensors.</font>"
return 1 return 1
vision_index++ if(vision_modes.len > 1)
if(vision_index > vision_modes.len) vision_index++
vision_index = 1 if(vision_index > vision_modes.len)
vision = vision_modes[vision_index] vision_index = 1
vision = vision_modes[vision_index]
holder.wearer << "<font color='blue'>You cycle your sensors to <b>[vision.mode]</b> mode.</font>" holder.wearer << "<font color='blue'>You cycle your sensors to <b>[vision.mode]</b> mode.</font>"
else
holder.wearer << "<font color='blue'>Your sensors only have one mode.</font>"
return 1 return 1
/obj/item/rig_module/vision/New() /obj/item/rig_module/vision/New()

View File

@@ -12,6 +12,8 @@
icon = 'icons/obj/rig_modules.dmi' icon = 'icons/obj/rig_modules.dmi'
desc = "A back-mounted hardsuit deployment and control mechanism." desc = "A back-mounted hardsuit deployment and control mechanism."
slot_flags = SLOT_BACK slot_flags = SLOT_BACK
req_one_access = null
req_access = null
w_class = 4 w_class = 4
// These values are passed on to all component pieces. // These values are passed on to all component pieces.
@@ -30,14 +32,17 @@
var/helm_type = /obj/item/clothing/head/helmet/space/rig var/helm_type = /obj/item/clothing/head/helmet/space/rig
var/boot_type = /obj/item/clothing/shoes/rig var/boot_type = /obj/item/clothing/shoes/rig
var/glove_type = /obj/item/clothing/gloves/rig var/glove_type = /obj/item/clothing/gloves/rig
var/cell_type = /obj/item/weapon/cell/high
var/air_type = /obj/item/weapon/tank/oxygen
//Component/device holders. //Component/device holders.
var/obj/item/weapon/cell/cell var/obj/item/weapon/tank/air_supply // Air tank, if any.
var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any. var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any.
var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any. var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any.
var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any. var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any.
var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any. var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any.
var/obj/item/rig_module/selected_module = null // Primary system (used with right-click) var/obj/item/weapon/cell/cell // Power supply, if any.
var/obj/item/rig_module/selected_module = null // Primary system (used with middle-click)
var/obj/item/rig_module/vision/visor // Kinda shitty to have a var for a module, but saves time. var/obj/item/rig_module/vision/visor // Kinda shitty to have a var for a module, but saves time.
var/obj/item/rig_module/voice/speech // As above. var/obj/item/rig_module/voice/speech // As above.
var/mob/living/carbon/human/wearer // The person currently wearing the rig. var/mob/living/carbon/human/wearer // The person currently wearing the rig.
@@ -45,6 +50,9 @@
var/list/installed_modules = list() // Power consumption/use bookkeeping. var/list/installed_modules = list() // Power consumption/use bookkeeping.
// Rig status vars. // Rig status vars.
var/open = 0 // Access panel status.
var/locked = 1 // Lock status.
var/emagged
var/sealing // Keeps track of seal status independantly of canremove. var/sealing // Keeps track of seal status independantly of canremove.
var/offline = 1 // Should we be applying suit maluses? var/offline = 1 // Should we be applying suit maluses?
var/offline_slowdown = 10 // If the suit is deployed and unpowered, it sets slowdown to this. var/offline_slowdown = 10 // If the suit is deployed and unpowered, it sets slowdown to this.
@@ -53,35 +61,60 @@
// Spark system, since we seem to need this a bunch. // Spark system, since we seem to need this a bunch.
var/datum/effect/effect/system/spark_spread/spark_system var/datum/effect/effect/system/spark_spread/spark_system
/obj/item/weapon/storage/rig/examine()
..()
if(wearer)
for(var/obj/item/piece in list(helmet,gloves,chest,boots))
if(!piece || piece.loc != wearer)
continue
usr << "\icon[piece] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed."
if(src.loc == usr)
usr << "The maintenance panel is [open ? "open" : "closed"]."
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</green>"]."
/obj/item/weapon/storage/rig/New() /obj/item/weapon/storage/rig/New()
..() ..()
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
locked = 0
spark_system = new() spark_system = new()
spark_system.set_up(5, 0, src) spark_system.set_up(5, 0, src)
spark_system.attach(src) spark_system.attach(src)
if(!cell)
cell = new /obj/item/weapon/cell/high(src)
processing_objects |= src processing_objects |= src
if(initial_modules && initial_modules.len) if(initial_modules && initial_modules.len)
for(var/path in initial_modules) for(var/path in initial_modules)
var/obj/item/rig_module/module = new path(src) var/obj/item/rig_module/module = new path()
installed_modules += module installed_modules += module
module.installed(src) module.installed(src)
// Create and initialize our various segments. // Create and initialize our various segments.
if(glove_type) gloves = new glove_type(src) if(cell_type)
if(helm_type) helmet = new helm_type(src) cell = new cell_type()
if(boot_type) boots = new boot_type(src) if(air_type)
if(chest_type) chest = new chest_type(src) air_supply = new air_type()
if(glove_type)
gloves = new glove_type()
verbs |= /obj/item/weapon/storage/rig/proc/toggle_gauntlets
if(helm_type)
helmet = new helm_type()
verbs |= /obj/item/weapon/storage/rig/proc/toggle_helmet
if(boot_type)
boots = new boot_type()
verbs |= /obj/item/weapon/storage/rig/proc/toggle_boots
if(chest_type)
chest = new chest_type()
verbs |= /obj/item/weapon/storage/rig/proc/toggle_chest
for(var/obj/item/piece in list(gloves,helmet,boots,chest)) for(var/obj/item/piece in list(gloves,helmet,boots,chest))
if(!piece) if(!piece)
continue continue
piece.canremove = 0
piece.name = "[suit_type] [initial(piece.name)]" piece.name = "[suit_type] [initial(piece.name)]"
piece.desc = "Seems to be part of \a [src]." piece.desc = "It seems to be part of a [src.name]."
piece.icon_state = "[initial(icon_state)]" piece.icon_state = "[initial(icon_state)]"
piece.armor = armor piece.armor = armor
piece.min_cold_protection_temperature = min_cold_protection_temperature piece.min_cold_protection_temperature = min_cold_protection_temperature
@@ -105,7 +138,7 @@
..() ..()
/obj/item/weapon/storage/rig/proc/suit_is_deployed() /obj/item/weapon/storage/rig/proc/suit_is_deployed()
if(!istype(wearer)) if(!istype(wearer) || src.loc != wearer || wearer.back != src)
return 0 return 0
if(helm_type && (!helmet || wearer.head != helmet)) if(helm_type && (!helmet || wearer.head != helmet))
return 0 return 0
@@ -140,7 +173,7 @@
failed_to_seal = 1 failed_to_seal = 1
if(!failed_to_seal && instant) if(!failed_to_seal && instant)
for(var/obj/item/piece in list(helmet,boots,gloves,chest,src)) for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue if(!piece) continue
piece.icon_state = "[initial(icon_state)]_sealed" piece.icon_state = "[initial(icon_state)]_sealed"
update_icon() update_icon()
@@ -207,13 +240,16 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest)) for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]" piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
piece.canremove = !seal_target
canremove = !seal_target canremove = !seal_target
if(helmet) if(helmet)
if(canremove) if(canremove)
if(flags & AIRTIGHT)
helmet.flags |= AIRTIGHT
helmet.flags_inv |= (HIDEEYES|HIDEFACE) helmet.flags_inv |= (HIDEEYES|HIDEFACE)
helmet.body_parts_covered |= (FACE|EYES) helmet.body_parts_covered |= (FACE|EYES)
else else
if(flags & AIRTIGHT)
helmet.flags &= ~AIRTIGHT
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE) helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
helmet.body_parts_covered &= ~(FACE|EYES) helmet.body_parts_covered &= ~(FACE|EYES)
update_icon(1) update_icon(1)
@@ -226,7 +262,7 @@
if(canremove) if(canremove)
for(var/obj/item/rig_module/module in installed_modules) for(var/obj/item/rig_module/module in installed_modules)
module.deactivate() module.deactivate()
for(var/obj/item/piece in list(helmet,boots,gloves,chest,src)) for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue if(!piece) continue
if(canremove && (flags & AIRTIGHT)) if(canremove && (flags & AIRTIGHT))
piece.flags &= ~STOPSPRESSUREDMAGE piece.flags &= ~STOPSPRESSUREDMAGE
@@ -329,16 +365,19 @@
var/i = 1 var/i = 1
for(var/obj/item/rig_module/module in installed_modules) for(var/obj/item/rig_module/module in installed_modules)
var/list/module_data = list( var/list/module_data = list(
"index" = i, "index" = i,
"name" = "[module.interface_name]", "name" = "[module.interface_name]",
"desc" = "[module.interface_desc]", "desc" = "[module.interface_desc]",
"can_use" = "[module.usable]", "can_use" = "[module.usable]",
"can_select" = "[module.selectable]", "can_select" = "[module.selectable]",
"can_toggle" = "[module.toggleable]", "can_toggle" = "[module.toggleable]",
"is_active" = "[module.active]", "is_active" = "[module.active]",
"engagecost" = module.use_power_cost*10, "engagecost" = module.use_power_cost*10,
"activecost" = module.active_power_cost*10, "activecost" = module.active_power_cost*10,
"passivecost" = module.passive_power_cost*10 "passivecost" = module.passive_power_cost*10,
"engagestring" = module.engage_string,
"activatestring" = module.activate_string,
"deactivatestring" = module.deactivate_string
) )
if(module.charges && module.charges.len) if(module.charges && module.charges.len)
@@ -359,7 +398,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui) if (!ui)
ui = new(user, src, ui_key, "hardsuit.tmpl", "Hardsuit Controller", 500, 600) ui = new(user, src, ui_key, "hardsuit.tmpl", "Hardsuit Controller", 800, 600)
ui.set_initial_data(data) ui.set_initial_data(data)
ui.open() ui.open()
ui.set_auto_update(1) ui.set_auto_update(1)
@@ -384,8 +423,7 @@
for(var/obj/item/rig_module/module in installed_modules) for(var/obj/item/rig_module/module in installed_modules)
if(module.suit_overlay) if(module.suit_overlay)
mob_icon.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]") mob_icon.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]")
if(chest) chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH)
chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH)
if(wearer) if(wearer)
wearer.update_inv_shoes() wearer.update_inv_shoes()
@@ -464,33 +502,23 @@
var/check_slot var/check_slot
var/equip_to var/equip_to
var/obj/item/use_obj var/obj/item/use_obj
var/plural
if(!canremove)
return
if(!H) if(!H)
return return
switch(piece) switch(piece)
if("helmet") if("helmet")
equip_to = slot_head equip_to = slot_head
use_obj = helmet use_obj = helmet
check_slot = H.head check_slot = H.head
if("gauntlets") if("gauntlets")
equip_to = slot_gloves equip_to = slot_gloves
use_obj = gloves use_obj = gloves
check_slot = H.gloves check_slot = H.gloves
plural = 1
if("boots") if("boots")
equip_to = slot_shoes equip_to = slot_shoes
use_obj = boots use_obj = boots
check_slot = H.shoes check_slot = H.shoes
plural = 1
if("chest") if("chest")
equip_to = slot_wear_suit equip_to = slot_wear_suit
use_obj = chest use_obj = chest
@@ -505,9 +533,10 @@
holder = use_obj.loc holder = use_obj.loc
if(istype(holder)) if(istype(holder))
if(use_obj && check_slot == use_obj) if(use_obj && check_slot == use_obj)
H << "<font color='blue'><b>Your [use_obj.name] [plural ? "retract" : "retracts"] swiftly.</b></font>" H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1 use_obj.canremove = 1
holder.drop_from_inventory(use_obj) holder.drop_from_inventory(use_obj)
use_obj.canremove = 0
use_obj.loc = null use_obj.loc = null
else if (deploy_mode != ONLY_RETRACT) else if (deploy_mode != ONLY_RETRACT)
@@ -516,10 +545,9 @@
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] is in the way.</span>" H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] is in the way.</span>"
return return
else else
H << "<font color='blue'><b>Your [use_obj.name] [plural ? "deploy" : "deploys"] swiftly.</b></span>" H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
use_obj.loc = H use_obj.loc = H
H.equip_to_slot(use_obj, equip_to) H.equip_to_slot(use_obj, equip_to)
use_obj.canremove = 0
if(piece == "helmet" && helmet) if(piece == "helmet" && helmet)
helmet.update_light(H) helmet.update_light(H)

View File

@@ -6,95 +6,159 @@
if(chest && (istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal) || istype(W, /obj/item/weapon/weldingtool))) if(chest && (istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal) || istype(W, /obj/item/weapon/weldingtool)))
return chest.attackby(W,user) return chest.attackby(W,user)
// Check if this is a hardsuit upgrade or a modification. // Lock or unlock the access panel.
if(istype(W,/obj/item/rig_module)) if(istype(W, /obj/item/weapon/card) || istype(W, /obj/item/device/pda))
if(istype(src.loc,/mob/living/carbon/human)) if(emagged)
var/mob/living/carbon/human/H = src.loc locked = 0
if(H.back == src) user << "<span class='danger'>It looks like the locking system has been shorted out.</span>"
user << "You can't install a hardsuit module while the suit is being worn." return
return 1 else if(istype(W, /obj/item/weapon/card/emag))
req_access = null
if(!installed_modules) installed_modules = list() req_one_access = null
if(installed_modules.len) locked = 0
for(var/obj/item/rig_module/installed_mod in installed_modules) emagged = 1
if(!installed_mod.redundant && istype(installed_mod,W)) user << "<span class='danger'>You short out the access protocol for the suit.</span>"
user << "The hardsuit already has a module of that class installed."
return 1
var/obj/item/rig_module/mod = W
user << "You carefully install \the [mod] into \the [src]."
user.drop_from_inventory(mod)
installed_modules |= mod
mod.loc = null
mod.installed(src)
update_icon()
return 1
else if(!cell && istype(W,/obj/item/weapon/cell))
user << "You jack \the [W] into \the [src]'s battery mount."
user.drop_from_inventory(W)
W.loc = null
src.cell = W
return
else if(istype(W,/obj/item/weapon/screwdriver))
var/list/current_mounts = list()
if(cell) current_mounts += "cell"
if(installed_modules && installed_modules.len) current_mounts += "system module"
var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
if(!to_remove)
return return
if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell") if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
var/mob/living/carbon/human/H = src.loc locked = 0
if(H.back == src) user << "<span class='danger'>\The [src] doesn't seem to have a locking mechanism.</span>"
user << "You can't remove an installed device while the hardsuit is being worn." return
return
switch(to_remove) if(!src.allowed(user))
user << "<span class='danger'>Access denied.</span>"
if("cell") return
if(cell)
user << "You detatch \the [cell] from \the [src]'s battery mount."
for(var/obj/item/rig_module/module in installed_modules)
module.deactivate()
cell.loc = user.put_in_hands(cell)
cell = null
else
user << "There is nothing loaded in that mount."
if("system module")
var/list/possible_removals = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.permanent)
continue
possible_removals[module.name] = module
if(!possible_removals.len)
user << "There are no installed modules to remove."
return
var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
if(!removal_choice)
return
var/obj/item/rig_module/removed = possible_removals[removal_choice]
user << "You detatch \the [removed] from \the [src]."
removed.loc = get_turf(src)
removed.removed()
installed_modules -= removed
update_icon()
locked = !locked
user << "You [locked ? "lock" : "unlock"] \the [src] access panel."
return return
else else if(istype(W,/obj/item/weapon/crowbar))
for(var/obj/item/rig_module/module in installed_modules)
if(module.accepts_item(W,user)) //Item is handled in this proc if(!open && locked)
user << "The access panel is locked shut."
return
open = !open
user << "You [open ? "open" : "close"] the access panel."
return
if(open)
// Air tank.
if(istype(W,/obj/item/weapon/tank)) //Todo, some kind of check for suits without integrated air supplies.
if(air_supply)
user << "\The [src] already has a tank installed."
return return
user.drop_from_inventory(W)
air_supply = W
W.loc = null
user << "You slot [W] into [src] and tighten the connecting valve."
return
// Check if this is a hardsuit upgrade or a modification.
else if(istype(W,/obj/item/rig_module))
if(istype(src.loc,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src.loc
if(H.back == src)
user << "<span class='danger'>You can't install a hardsuit module while the suit is being worn.</span>"
return 1
if(!installed_modules) installed_modules = list()
if(installed_modules.len)
for(var/obj/item/rig_module/installed_mod in installed_modules)
if(!installed_mod.redundant && istype(installed_mod,W))
user << "The hardsuit already has a module of that class installed."
return 1
var/obj/item/rig_module/mod = W
user << "You carefully install \the [mod] into \the [src]."
user.drop_from_inventory(mod)
installed_modules |= mod
mod.loc = null
mod.installed(src)
update_icon()
return 1
else if(!cell && istype(W,/obj/item/weapon/cell))
user << "You jack \the [W] into \the [src]'s battery mount."
user.drop_from_inventory(W)
W.loc = null
src.cell = W
return
else if(istype(W,/obj/item/weapon/wrench))
if(!air_supply)
user << "There is not tank to remove."
return
user.put_in_hands(air_supply)
user << "You detach and remove \the [air_supply]."
air_supply = null
return
else if(istype(W,/obj/item/weapon/screwdriver))
var/list/current_mounts = list()
if(cell) current_mounts += "cell"
if(installed_modules && installed_modules.len) current_mounts += "system module"
var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
if(!to_remove)
return
if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell")
var/mob/living/carbon/human/H = src.loc
if(H.back == src)
user << "You can't remove an installed device while the hardsuit is being worn."
return
switch(to_remove)
if("cell")
if(cell)
user << "You detatch \the [cell] from \the [src]'s battery mount."
for(var/obj/item/rig_module/module in installed_modules)
module.deactivate()
cell.loc = user.put_in_hands(cell)
cell = null
else
user << "There is nothing loaded in that mount."
if("system module")
var/list/possible_removals = list()
for(var/obj/item/rig_module/module in installed_modules)
if(module.permanent)
continue
possible_removals[module.name] = module
if(!possible_removals.len)
user << "There are no installed modules to remove."
return
var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
if(!removal_choice)
return
var/obj/item/rig_module/removed = possible_removals[removal_choice]
user << "You detatch \the [removed] from \the [src]."
removed.loc = get_turf(src)
removed.removed()
installed_modules -= removed
update_icon()
return
// If we've gotten this far, all we have left to do before we pass off to root procs
// is check if any of the loaded modules want to use the item we've been given.
for(var/obj/item/rig_module/module in installed_modules)
if(module.accepts_item(W,user)) //Item is handled in this proc
return
..() ..()

View File

@@ -19,12 +19,14 @@
heat_protection = HANDS heat_protection = HANDS
cold_protection = HANDS cold_protection = HANDS
species_restricted = null species_restricted = null
gender = PLURAL
/obj/item/clothing/shoes/rig /obj/item/clothing/shoes/rig
name = "boots" name = "boots"
cold_protection = FEET cold_protection = FEET
heat_protection = FEET heat_protection = FEET
species_restricted = null species_restricted = null
gender = PLURAL
/obj/item/clothing/suit/space/rig /obj/item/clothing/suit/space/rig
name = "chestpiece" name = "chestpiece"

View File

@@ -32,7 +32,7 @@
else else
visor.deactivate() visor.deactivate()
/obj/item/weapon/storage/rig/verb/toggle_helmet() /obj/item/weapon/storage/rig/proc/toggle_helmet()
set name = "Toggle Helmet" set name = "Toggle Helmet"
set desc = "Deploys or retracts your helmet." set desc = "Deploys or retracts your helmet."
@@ -41,7 +41,7 @@
toggle_piece("helmet",wearer) toggle_piece("helmet",wearer)
/obj/item/weapon/storage/rig/verb/toggle_chest() /obj/item/weapon/storage/rig/proc/toggle_chest()
set name = "Toggle Chestpiece" set name = "Toggle Chestpiece"
set desc = "Deploys or retracts your chestpiece." set desc = "Deploys or retracts your chestpiece."
@@ -50,7 +50,7 @@
toggle_piece("chest",wearer) toggle_piece("chest",wearer)
/obj/item/weapon/storage/rig/verb/toggle_gauntlets() /obj/item/weapon/storage/rig/proc/toggle_gauntlets()
set name = "Toggle Gauntlets" set name = "Toggle Gauntlets"
set desc = "Deploys or retracts your gauntlets." set desc = "Deploys or retracts your gauntlets."
@@ -59,7 +59,7 @@
toggle_piece("gauntlets",wearer) toggle_piece("gauntlets",wearer)
/obj/item/weapon/storage/rig/verb/toggle_boots() /obj/item/weapon/storage/rig/proc/toggle_boots()
set name = "Toggle Boots" set name = "Toggle Boots"
set desc = "Deploys or retracts your boots." set desc = "Deploys or retracts your boots."

View File

@@ -6,28 +6,57 @@
siemens_coefficient = 0.6 siemens_coefficient = 0.6
offline_slowdown = 3 offline_slowdown = 3
req_access = list(access_cent_specops)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100) armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \ /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \ /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun) /obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun)
initial_modules = list() initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/datajack,
/obj/item/rig_module/mounted
)
/obj/item/weapon/storage/rig/ert/engineer /obj/item/weapon/storage/rig/ert/engineer
name = "ERT-E suit control module" name = "ERT-E suit control module"
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready." desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
suit_type = "ERT engineer" suit_type = "ERT engineer"
icon_state = "ert_engineer_rig" icon_state = "ert_engineer_rig"
initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/device/rcd,
/obj/item/rig_module/foam_sprayer
)
/obj/item/weapon/storage/rig/ert/medical /obj/item/weapon/storage/rig/ert/medical
name = "ERT-M suit control module" name = "ERT-M suit control module"
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready." desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
suit_type = "ERT medic" suit_type = "ERT medic"
icon_state = "ert_medical_rig" icon_state = "ert_medical_rig"
initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/device/healthscanner,
/obj/item/rig_module/chem_dispenser/injector
)
/obj/item/weapon/storage/rig/ert/security /obj/item/weapon/storage/rig/ert/security
name = "ERT-S suit control module" name = "ERT-S suit control module"
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready." desc = "A suit worn by the security division of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
suit_type = "ERT security" suit_type = "ERT security"
icon_state = "ert_security_rig" icon_state = "ert_security_rig"
initial_modules = list(
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/grenade_launcher,
/obj/item/rig_module/mounted
)

View File

@@ -4,6 +4,8 @@
desc = "An advanced powered armour suit with many cyberwarfare enhancements." desc = "An advanced powered armour suit with many cyberwarfare enhancements."
icon_state = "hacker_rig" icon_state = "hacker_rig"
req_access = list(access_syndicate)
helm_type = /obj/item/clothing/head/helmet/space/rig/mask helm_type = /obj/item/clothing/head/helmet/space/rig/mask
initial_modules = list( initial_modules = list(

View File

@@ -0,0 +1,22 @@
/obj/item/weapon/storage/rig/industrial
name = "industrial suit control module"
suit_type = "industrial hardsuit"
desc = "A heavy, powerful rig used by construction crews and mining corporations."
icon_state = "engineering_rig"
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
slowdown = 3
offline_slowdown = 10
offline_vision_restriction = 2
req_access = null
req_one_access = null
initial_modules = list(
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/device/drill,
/obj/item/rig_module/device/orescanner,
/obj/item/rig_module/device/rcd,
/obj/item/rig_module/vision/meson
)
..()

View File

@@ -7,6 +7,8 @@
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 = 15, bomb = 30, bio = 30, rad = 30)
slowdown = 0 slowdown = 0
req_access = list(access_syndicate)
initial_modules = list( initial_modules = list(
/obj/item/rig_module/teleporter, /obj/item/rig_module/teleporter,
/obj/item/rig_module/stealth_field, /obj/item/rig_module/stealth_field,

View File

@@ -4,6 +4,8 @@
desc = "A highly advanced and expensive suit designed for covert operations." desc = "A highly advanced and expensive suit designed for covert operations."
icon_state = "ninja_rig" icon_state = "ninja_rig"
req_access = list(access_syndicate)
initial_modules = list( initial_modules = list(
/obj/item/rig_module/teleporter, /obj/item/rig_module/teleporter,
/obj/item/rig_module/stealth_field, /obj/item/rig_module/stealth_field,

View File

@@ -64,20 +64,28 @@
return (tally+config.human_delay) return (tally+config.human_delay)
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0) /mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
//Can we act //Can we act?
if(restrained()) return 0 if(restrained()) return 0
//Do we have a working jetpack //Do we have a working jetpack?
if(istype(back, /obj/item/weapon/tank/jetpack)) var/obj/item/weapon/tank/jetpack/thrust
var/obj/item/weapon/tank/jetpack/J = back if(back)
if(((!check_drift) || (check_drift && J.stabilization_on)) && (!lying) && (J.allow_thrust(0.01, src))) if(istype(back,/obj/item/weapon/tank/jetpack))
thrust = back
else if(istype(back,/obj/item/weapon/storage/rig))
var/obj/item/weapon/storage/rig/rig = back
for(var/obj/item/rig_module/maneuvering_jets/module in rig.installed_modules)
thrust = module.jets
break
if(thrust)
if(((!check_drift) || (check_drift && thrust.stabilization_on)) && (!lying) && (thrust.allow_thrust(0.01, src)))
inertia_dir = 0 inertia_dir = 0
return 1 return 1
// if(!check_drift && J.allow_thrust(0.01, src))
// return 1
//If no working jetpack then use the other checks //If no working jetpack then use the other checks
if(..()) return 1 if(..())
return 1
return 0 return 0

View File

@@ -422,8 +422,16 @@
proc/get_breath_from_internal(volume_needed) proc/get_breath_from_internal(volume_needed)
if(internal) if(internal)
if (!contents.Find(internal) || !((wear_mask && (wear_mask.flags & AIRTIGHT)) || (head && (head.flags & AIRTIGHT))))
var/obj/item/weapon/tank/rig_supply
if(istype(back,/obj/item/weapon/storage/rig))
var/obj/item/weapon/storage/rig/rig = back
if(!rig.offline && (rig.air_supply && internal == rig.air_supply))
rig_supply = rig.air_supply
if (!rig_supply && (!contents.Find(internal) || !((wear_mask && (wear_mask.flags & AIRTIGHT)) || (head && (head.flags & AIRTIGHT)))))
internal = null internal = null
if(internal) if(internal)
return internal.remove_air_volume(volume_needed) return internal.remove_air_volume(volume_needed)
else if(internals) else if(internals)

View File

@@ -824,7 +824,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(back.icon_override) if(back.icon_override)
overlays_standing[BACK_LAYER] = image("icon" = back.icon_override, "icon_state" = "[back.icon_state]") overlays_standing[BACK_LAYER] = image("icon" = back.icon_override, "icon_state" = "[back.icon_state]")
//If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc. //If this is a rig and a mob_icon is set, it will take species into account in the rig update_icon() proc.
else if(istype(rig) && rig.mob_icon) else if(istype(rig) && !rig.offline && rig.mob_icon)
overlays_standing[BACK_LAYER] = rig.mob_icon overlays_standing[BACK_LAYER] = rig.mob_icon
else if(back.sprite_sheets && back.sprite_sheets[species.name]) else if(back.sprite_sheets && back.sprite_sheets[species.name])
overlays_standing[BACK_LAYER] = image("icon" = back.sprite_sheets[species.name], "icon_state" = "[back.icon_state]") overlays_standing[BACK_LAYER] = image("icon" = back.sprite_sheets[species.name], "icon_state" = "[back.icon_state]")

View File

@@ -3,12 +3,12 @@ Title: Integrated Hardsuit Controller
Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
--> -->
<table width = '460px'> <table align = 'center'>
<tr> <tr>
<td width = '150px'> <td width = '150px'>
<b>Suit status:</b> <b>Suit status:</b>
</td> </td>
<td width = '150px'> <td width>
{{if data.sealing == 1}} {{if data.sealing == 1}}
<font color = 'orange'><b>SEALING</b></font> <font color = 'orange'><b>SEALING</b></font>
{{else}} {{else}}
@@ -19,7 +19,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
{{/if}} {{/if}}
{{/if}} {{/if}}
</td> </td>
<td width = '150px'> <td width>
{{:helper.link('Toggle', 'circle-arrow-s', {'toggle_seals' : 1}, null)}}<br/> {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_seals' : 1}, null)}}<br/>
</td> </td>
</tr> </tr>
@@ -36,7 +36,7 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
<h2>Hardware</h2> <h2>Hardware</h2>
<h3>Suit pieces</h3> <h3>Suit pieces</h3>
<table width = '460px'> <table align = 'center'>
<tr> <tr>
<td width = '150px'> <td width = '150px'>
<b>Helmet:</b> <b>Helmet:</b>
@@ -103,32 +103,23 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
{{/if}} {{/if}}
</h3></font> </h3></font>
{{if data.modules}} {{if data.modules}}
<table align = 'center' width = '460px'> <table align = 'center'>
{{for data.modules}} {{for data.modules}}
<tr> <tr>
<td> <td width = '60%'>
<div class='average'> <div class='average'>
<strong>{{:value.name}}</strong> <strong>{{:value.name}}</strong> [E: {{:value.engagecost}} | A: {{:value.activecost}} | P: {{:value.passivecost}}]
</div> </div>
</td> </td>
<td align = 'center' width = '80px'>
E: {{:value.engagecost}}
</td>
<td align = 'center' width = '80px'>
A: {{:value.activecost}}
</td>
<td align = 'center' width = '80px'>
P: {{:value.passivecost}}
</td>
</tr> </tr>
<tr> <tr>
<td align = 'left'> <td align = 'left'>
<div class = 'caption'>{{:value.desc}}</font></div> <div class = 'caption'>{{:value.desc}}</div>
</td> </td>
<td colspan = 3 align = 'center'> <td colspan = 3 align = 'center'>
{{if value.can_use == 1}} {{if value.can_use == 1}}
<div class='itemContent'> <div class='itemContent'>
{{:helper.link('Engage', 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'engage'}, null)}} {{:helper.link(value.engagestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'engage'}, null)}}
</div> </div>
{{/if}} {{/if}}
{{if value.can_select == 1}} {{if value.can_select == 1}}
@@ -143,9 +134,9 @@ Used In File(s): /code/modules/clothing/spacesuits/rig/rig.dm
{{if value.can_toggle == 1}} {{if value.can_toggle == 1}}
<div class='itemContent'> <div class='itemContent'>
{{if value.is_active == 1}} {{if value.is_active == 1}}
{{:helper.link('Deactivate', 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'deactivate'}, null)}} {{:helper.link(value.deactivatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'deactivate'}, null)}}
{{else}} {{else}}
{{:helper.link('Activate', 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'activate'}, null)}} {{:helper.link(value.activatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'activate'}, null)}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}