This commit is contained in:
Markolie
2015-03-16 18:49:47 +01:00
parent d266436143
commit cacc2bf917
21 changed files with 90 additions and 77 deletions
-10
View File
@@ -464,16 +464,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
else . = pick(ais)
return .
//this is like the above function, but for alien borgs. Im not going to go over verbose with the name.
/proc/select_active_alien_ai()
var/mob/living/silicon/ai/selected
var/list/active = active_ais()
for(var/mob/living/silicon/ai/A in active)
if(!selected || ((selected.connected_robots > A.connected_robots) && selected.alienAI))
selected = A
return selected
/proc/get_sorted_mobs()
var/list/old_list = getmobs()
var/list/AI_list = list()
-3
View File
@@ -34,9 +34,6 @@
if(control_disabled || stat)
return
if(alienAI)
return
var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
+3
View File
@@ -232,6 +232,9 @@
set name = "Harvest honeycomb"
set category = "Object"
if(usr.stat || !usr.canmove || usr.restrained())
return
while(health > 15)
health -= 15
var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
+1 -1
View File
@@ -5,7 +5,7 @@
icon = 'icons/mob/AI.dmi'
icon_state = "0"
var/state = 0
var/datum/ai_laws/laws = new()
var/datum/ai_laws/laws = null
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/device/mmi/brain = null
-3
View File
@@ -200,9 +200,6 @@ Class Procs:
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_ai(var/mob/user as mob)
if(isAI(user))
var/mob/living/silicon/ai/A = user
if(A.alienAI) return
if(isrobot(user))
// For some reason attack_robot doesn't work
// This is to stop robots from using cameras to remotely control machines.
+3
View File
@@ -548,6 +548,9 @@
usr << "<span class='warning'>Access denied.</span>" //Unless emagged of course
flick(src.icon_deny,src)
return
if(!R.amount)
user << "\red The vending machine has ran out of that product."
return
src.vend_ready = 0 //One thing at a time!!
src.status_message = "Vending..."
src.status_error = 0
@@ -34,23 +34,9 @@
return
else
user << "\red Access Denied"
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The locker has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
else
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The locker has been broken by [] with an electromagnetic card!", user), 1, text("You hear a faint electrical spark."), 2)
else if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)
emag_act(user)
return
if(!locked)
..()
else
@@ -65,6 +51,14 @@
..()
return
/obj/item/weapon/storage/lockbox/emag_act(user as mob)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = src.icon_broken
user << "<span class='notice'>You unlock \the [src].</span>"
return
/obj/item/weapon/storage/lockbox/loyalty
name = "Lockbox (Loyalty Implants)"
@@ -186,6 +186,9 @@
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcharges != 0)
if(!(src.z in config.contact_levels))
user << "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>"
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
@@ -87,8 +87,8 @@
src.desc = "Owned by [I.registered_name]."
else
user << "\red Access Denied"
else if((istype(W, /obj/item/weapon/card/emag)) && !src.broken)
emag_act()
else if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)
emag_act(user)
else
user << "\red Access Denied"
return
@@ -77,20 +77,21 @@
user.drop_item()
if(W)
W.loc = src.loc
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
emag_act()
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)
emag_act(user)
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
return ..(W,user)
else
togglelock(user)
/obj/structure/closet/secure_closet/emag_act()
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
usr<< "<span class='notice'>You unlock \the [src].</span>"
/obj/structure/closet/secure_closet/emag_act(user as mob)
if(!broken)
broken = 1
locked = 0
desc = "It appears to be broken."
icon_state = icon_off
flick(icon_broken, src)
user << "<span class='notice'>You unlock \the [src].</span>"
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
src.add_fingerprint(user)
@@ -82,6 +82,9 @@
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcharges != 0)
if(!(src.z in config.player_levels))
user << "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>"
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
@@ -294,23 +297,24 @@
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(is_type_in_list(W, list(/obj/item/stack/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
return ..()
if(locked && (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)))
emag_act()
if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)))
emag_act(user)
return
if(!opened)
src.togglelock(user)
return
return ..()
/obj/structure/closet/crate/secure/emag_act()
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
update_icon()
usr << "<span class='notice'>You unlock \the [src].</span>"
return
/obj/structure/closet/crate/secure/emag_act(user as mob)
if(locked)
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
playsound(src.loc, "sparks", 60, 1)
src.locked = 0
src.broken = 1
update_icon()
user << "<span class='notice'>You unlock \the [src].</span>"
return
/obj/structure/closet/crate/secure/emp_act(severity)
for(var/obj/O in src)
+2 -2
View File
@@ -48,8 +48,8 @@
I.add_fingerprint(target)
src.update_inv_l_hand()
src.update_inv_r_hand()
usr.update_inv_l_hand()
usr.update_inv_r_hand()
target.update_inv_l_hand()
target.update_inv_r_hand()
target.visible_message("<span class='notice'> [usr.name] handed \the [I.name] to [target.name].</span>")
if("No")
target.visible_message("<span class='warning'> [usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
-1
View File
@@ -61,7 +61,6 @@ var/list/ai_verbs_default = list(
var/obj/item/device/pda/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
var/alienAI = 0
var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null
@@ -479,16 +479,26 @@
id = "translator"
toggle(mob/living/silicon/pai/user)
// Sol Common, Tradeband and Gutter are added with New() and are therefore the current default, always active languages
// Galactic Common, Sol Common, Tradeband, Gutter and Trinary are added with New() and are therefore the current default, always active languages
user.translator_on = !user.translator_on
if(user.translator_on)
user.add_language("Sinta'unathi")
user.add_language("Siik'tajr")
user.add_language("Skrellian")
user.add_language("Vox-pidgin")
user.add_language("Rootspeak")
user.add_language("Chittin")
user.add_language("Bubblish")
user.add_language("Clownish")
else
user.remove_language("Sinta'unathi")
user.remove_language("Siik'tajr")
user.remove_language("Skrellian")
user.remove_language("Vox-pidgin")
user.remove_language("Rootspeak")
user.remove_language("Chittin")
user.remove_language("Bubblish")
user.remove_language("Clownish")
is_active(mob/living/silicon/pai/user)
return user.translator_on
+1 -1
View File
@@ -23,7 +23,7 @@
playsound(user, "sparks", 50, 1)
playsound(user, 'sound/weapons/blade1.ogg', 50, 1)
user.visible_message("<span class='danger'>[user] masterfully slices [target]!</span>", "<span class='notice'>You masterfully slice [target]!</span>")
target.emag_act()
target.emag_act(user)
sleep(15)
cooldown = 0
+5
View File
@@ -37,6 +37,11 @@
icon_state = "pen_red"
colour = "red"
/obj/item/weapon/pen/gray
name = "gray-ink pen"
desc = "It's a normal gray ink pen."
colour = "gray"
/obj/item/weapon/pen/invisible
desc = "It's an invisble pen marker."
icon_state = "pen"
+11 -10
View File
@@ -158,15 +158,7 @@
/obj/machinery/photocopier/proc/copy(var/obj/item/weapon/paper/copy)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
else //no toner? shitty copies for you!
c.info = "<font color = #808080>"
var/copied = html_decode(copy.info)
copied = replacetext(copied, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
copied = replacetext(copied, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.crayonfont]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
c.info += copied
c.info += "</font>"
c.info = copy.info
c.name = copy.name // -- Doohl
c.fields = copy.fields
c.stamps = copy.stamps
@@ -197,7 +189,16 @@
/obj/machinery/photocopier/proc/photocopy(var/obj/item/weapon/photo/photocopy)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
p.name = photocopy.name
p.icon = photocopy.icon
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
if(toner > 10) //plenty of toner, go straight greyscale
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.
p.img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
p.tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
else //not much toner left, lighten the photo
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.icon = I
p.tiny = photocopy.tiny
p.img = photocopy.img
p.desc = photocopy.desc
@@ -215,4 +215,9 @@
update_icon()
else
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
return
return
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/sawoff(mob/user as mob)
user << "<span class='warning'>Shortening \the [src] will break it.</span>"
return
@@ -58,8 +58,8 @@
req_tech = list("materials" = 5, "magnets" = 5, "engineering" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 300, "$glass" = 400, "$plasma" = 250, "$uranium" = 1000)
build_path = /obj/item/clothing/glasses/meson
category = list("Mining")
build_path = /obj/item/clothing/glasses/meson/night
category = list("Equipment")
/datum/design/mesons
name = "Optical Meson Scanners"
+3 -3
View File
@@ -252,8 +252,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 2.1
else if(href_list["maxresearch"]) //Eject the item inside the destructive analyzer.
if(!usr.client.holder) return
if(usr.client.holder & R_MENTOR) return
if(!check_rights(R_ADMIN))
return
screen = 0.0
if(alert("Are you sure you want to maximize research levels?","Confirmation","Yes","No")=="No")
return
@@ -769,7 +769,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "<span class='linkOn'>Disconnect from Research Network</span><BR>"
dat += "<A href='?src=\ref[src];menu=1.7'>Device Linkage Menu</A><BR>"
dat += "<A href='?src=\ref[src];lock=0.2'>Lock Console</A><BR>"
if(user.client.holder)
if(check_rights(R_ADMIN))
dat += "<A href='?src=\ref[src];maxresearch=1'>\[ADMIN\] Maximize Research Levels</A><BR>"
dat += "<A href='?src=\ref[src];reset=1'>Reset R&D Database</A></div>"
+1
View File
@@ -127,6 +127,7 @@
/obj/item/weapon/rcs/Destroy()
processing_objects.Remove(src)
..()
/obj/item/weapon/rcs/process()
if(rcharges > 10)
rcharges = 10