HONKputer fixes, should be able to be fully built and deconstructed now

This commit is contained in:
ZomgPonies
2013-09-12 09:51:49 -04:00
parent 9827f7d02f
commit 3484cf6512
3 changed files with 31 additions and 14 deletions
+3 -10
View File
@@ -220,10 +220,11 @@
/obj/item/weapon/circuitboard/HONKputer
name = "Circuit board (HONKputer)"
build_path = "obj/machinery/computer/HONKputer"
build_path = "/obj/machinery/computer/HONKputer"
origin_tech = "programming=4"
icon = 'icons/obj/machines/HONKputer.dmi'
icon_state = "bananium_board"
board_type = "honkcomputer"
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
@@ -438,7 +439,7 @@
src.state = 0
if(istype(P, /obj/item/weapon/circuitboard) && !circuit)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "computer")
if(B.board_type == "honkcomputer")
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You place the circuit board inside the frame."
src.icon_state = "1"
@@ -508,12 +509,4 @@
if(circuit.id) B:id = circuit.id
if(circuit.records) B:records = circuit.records
if(circuit.frequency) B:frequency = circuit.frequency
if(istype(circuit,/obj/item/weapon/circuitboard/supplycomp))
var/obj/machinery/computer/supplycomp/SC = B
var/obj/item/weapon/circuitboard/supplycomp/C = circuit
SC.can_order_contraband = C.contraband_enabled
if(istype(circuit,/obj/item/weapon/circuitboard/security))
var/obj/machinery/computer/security/C = B
var/obj/item/weapon/circuitboard/security/CB = circuit
C.network = CB.network
del(src)
+27 -3
View File
@@ -10,10 +10,9 @@
var/state = STATE_DEFAULT
var/const/STATE_DEFAULT = 1
/obj/machinery/computer/communications/process()
/obj/machinery/computer/HONKputer/process()
if(..())
if(state != STATE_STATUSDISPLAY)
src.updateDialog()
src.updateDialog()
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
@@ -91,3 +90,28 @@
dat += "<BR>\[ [(src.state != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=honkputer'>Close</A> \]"
user << browse(dat, "window=honkputer;size=400x500")
onclose(user, "honkputer")
/obj/machinery/computer/HONKputer/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/HONKputer/A = new /obj/structure/computerframe/HONKputer( 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
+1 -1
View File
@@ -84,7 +84,7 @@
if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you.
if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier)
if(body_part != HEAD)
if ( (sharp && prob(8 * brute)) || (brute > 20 && prob(3 * brute)) )
if ( (sharp && prob(8 * brute)) || (brute > 20 && prob(2 * brute)) )
droplimb(1)
return
else if( (sharp && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) )