Action buttons + More mobs!

- Scanner control is now an action button.
- Fixed multiple scanner bugs (I think)
- Gave ability to drones and borgs.
This commit is contained in:
GunHog
2015-10-08 11:30:39 -05:00
parent 647dd5dbb4
commit dcbcfefa01
8 changed files with 43 additions and 6 deletions
+33 -1
View File
@@ -264,4 +264,36 @@
if(owner.mind)
if(target in owner.mind.spell_list)
return 0
return !(target in owner.mob_spell_list)
return !(target in owner.mob_spell_list)
//Action button controlling a mob's research examine ability.
/datum/action/scan_mode
name = "Toggle Research Scanner"
button_icon_state = "scan_mode"
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_ALIVE
action_type = AB_INNATE
var/devices = 0 //How may enabled scanners the mob has
/datum/action/scan_mode/Activate()
active = 1
owner.research_scanner = 1
owner << "<span class='notice'> Research analyzer is now active.</span>"
/datum/action/scan_mode/Deactivate()
active = 0
owner.research_scanner = 0
owner << "<span class='notice'> Research analyzer deactivated.</span>"
/datum/action/scan_mode/Grant(mob/living/T)
devices += 1
..(T)
/datum/action/scan_mode/CheckRemoval(mob/living/user)
if(devices)
return 0
return 1
/datum/action/scan_mode/Remove(mob/living/T)
owner.research_scanner = 0
..(T)
+1 -1
View File
@@ -189,7 +189,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
msg += "[capitalize(copytext(mat, 2))]<BR>" //Capitize first word, remove the "$"
else
msg += "<span class='danger'>No extractable materials detected.</span><BR>"
msg += "*--------* <BR>"
msg += "*--------*"
user << msg
+3 -2
View File
@@ -38,11 +38,12 @@
item_state = "glasses"
/obj/item/clothing/glasses/science/equipped(mob/user, slot)
user.research_scanner = 1
if(slot == slot_glasses)
user.scanner.Grant(user)
..(user, slot)
/obj/item/clothing/glasses/science/dropped(mob/user)
user.research_scanner = initial(user.research_scanner) //Because some mobs might have it defaulted to 1.
user.scanner.devices -= 1
..(user)
/obj/item/clothing/glasses/night
+2 -2
View File
@@ -325,11 +325,11 @@
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 100, bio = 100, rad = 60)
/obj/item/clothing/head/helmet/space/hardsuit/rd/equipped(mob/user, slot)
user.research_scanner = 1
user.scanner.Grant(user)
..(user, slot)
/obj/item/clothing/head/helmet/space/hardsuit/rd/dropped(mob/user)
user.research_scanner = 0
user.scanner.devices -= 1
..(user)
/obj/item/clothing/suit/space/hardsuit/rd
@@ -125,6 +125,7 @@
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
aicamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
toner = 40
scanner.Grant(src)
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
/mob/living/silicon/robot/Destroy()
@@ -80,6 +80,8 @@
var/obj/item/I = new default_hatmask(src)
equip_to_slot_or_del(I, slot_head)
scanner.Grant(src)
alert_drones(DRONE_NET_CONNECT)
+1
View File
@@ -94,6 +94,7 @@
var/datum/hud/hud_used = null
var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining.
var/datum/action/scan_mode/scanner = new
var/list/grabbed_by = list( )
var/list/requests = list( )