mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-26 17:22:56 +00:00
Conflicts: baystation12.dme code/__HELPERS/game.dm code/__HELPERS/type2type.dm code/datums/helper_datums/getrev.dm code/game/atoms.dm code/game/gamemodes/events.dm code/game/machinery/atmo_control.dm code/game/machinery/atmoalter/area_atmos_computer.dm code/game/machinery/computer/HolodeckControl.dm code/game/machinery/computer/atmos_alert.dm code/game/machinery/computer/card.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/computer.dm code/game/machinery/computer/pod.dm code/game/machinery/computer/prisoner.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/newscaster.dm code/game/machinery/spaceheater.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/logbrowser.dm code/game/machinery/telecomms/machine_interactions.dm code/game/machinery/telecomms/telemonitor.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/wishgranter.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/stack.dm code/game/objects/objs.dm code/modules/DetectiveWork/detective_work.dm code/modules/admin/IsBanned.dm code/modules/admin/admin.dm code/modules/admin/verbs/adminsay.dm code/modules/admin/verbs/getlogs.dm code/modules/awaymissions/zlevel.dm code/modules/client/client procs.dm code/modules/clothing/masks/miscellaneous.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/flufftext/TextFilters.dm code/modules/mining/machine_processing.dm code/modules/mining/machine_stacking.dm code/modules/mining/mine_items.dm code/modules/mining/mint.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/living/carbon/monkey/life.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/simple_animal/friendly/corgi.dm code/modules/mob/mob.dm code/modules/paperwork/filingcabinet.dm code/modules/paperwork/photocopier.dm code/modules/power/gravitygenerator.dm html/changelog.html icons/mob/head.dmi icons/mob/human_face.dmi icons/mob/mask.dmi icons/mob/suit.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/masks.dmi icons/obj/clothing/suits.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
137 lines
2.8 KiB
Plaintext
137 lines
2.8 KiB
Plaintext
/obj/machinery/computer
|
|
name = "computer"
|
|
icon = 'icons/obj/computer.dmi'
|
|
density = 1
|
|
anchored = 1.0
|
|
var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassemble
|
|
|
|
|
|
New()
|
|
..()
|
|
spawn(2)
|
|
power_change()
|
|
|
|
|
|
meteorhit(var/obj/O as obj)
|
|
for(var/x in verbs)
|
|
verbs -= x
|
|
set_broken()
|
|
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
|
smoke.set_up(5, 0, src)
|
|
smoke.start()
|
|
return
|
|
|
|
|
|
emp_act(severity)
|
|
if(prob(20/severity)) set_broken()
|
|
..()
|
|
|
|
|
|
ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(25))
|
|
del(src)
|
|
return
|
|
if (prob(50))
|
|
for(var/x in verbs)
|
|
verbs -= x
|
|
set_broken()
|
|
if(3.0)
|
|
if (prob(25))
|
|
for(var/x in verbs)
|
|
verbs -= x
|
|
set_broken()
|
|
else
|
|
return
|
|
|
|
bullet_act(var/obj/item/projectile/Proj)
|
|
if(prob(Proj.damage))
|
|
set_broken()
|
|
..()
|
|
|
|
|
|
blob_act()
|
|
if (prob(75))
|
|
for(var/x in verbs)
|
|
verbs -= x
|
|
set_broken()
|
|
density = 0
|
|
|
|
|
|
power_change()
|
|
if(!istype(src,/obj/machinery/computer/security/telescreen))
|
|
if(stat & BROKEN)
|
|
icon_state = initial(icon_state)
|
|
icon_state += "b"
|
|
if (istype(src,/obj/machinery/computer/aifixer))
|
|
overlays = null
|
|
|
|
else if(powered())
|
|
icon_state = initial(icon_state)
|
|
stat &= ~NOPOWER
|
|
if (istype(src,/obj/machinery/computer/aifixer))
|
|
var/obj/machinery/computer/aifixer/O = src
|
|
if (O.occupant)
|
|
switch (O.occupant.stat)
|
|
if (0)
|
|
overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
|
if (2)
|
|
overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
|
|
else
|
|
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
|
else
|
|
spawn(rand(0, 15))
|
|
//icon_state = "c_unpowered"
|
|
icon_state = initial(icon_state)
|
|
icon_state += "0"
|
|
stat |= NOPOWER
|
|
if (istype(src,/obj/machinery/computer/aifixer))
|
|
overlays = null
|
|
|
|
|
|
process()
|
|
if(stat & (NOPOWER|BROKEN))
|
|
return
|
|
use_power(250)
|
|
|
|
|
|
proc/set_broken()
|
|
icon_state = initial(icon_state)
|
|
icon_state += "b"
|
|
stat |= BROKEN
|
|
|
|
|
|
attackby(I as obj, user as mob)
|
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
|
if(do_after(user, 20))
|
|
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
|
A.circuit = M
|
|
A.anchored = 1
|
|
for (var/obj/C in src)
|
|
C.loc = src.loc
|
|
if (src.stat & BROKEN)
|
|
user << "\blue The broken glass falls out."
|
|
new /obj/item/weapon/shard( src.loc )
|
|
A.state = 3
|
|
A.icon_state = "3"
|
|
else
|
|
user << "\blue You disconnect the monitor."
|
|
A.state = 4
|
|
A.icon_state = "4"
|
|
del(src)
|
|
else
|
|
src.attack_hand(user)
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|