From be079897e1024df97d2a291f4612d9e7bbaad8ee Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Sun, 21 Sep 2014 20:39:29 +0100 Subject: [PATCH] Adds default toolbox for drones, Moves drone hud to drone hud file, ticks drone hud file. --- code/_onclick/hud/other_mobs.dm | 85 ------------------- .../objects/items/weapons/storage/toolbox.dm | 15 ++++ .../living/simple_animal/friendly/drone.dm | 9 +- tgstation.dme | 1 + 4 files changed, 19 insertions(+), 91 deletions(-) diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index dd828fd7f89..a6a76e74355 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -31,88 +31,3 @@ mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay) -/datum/hud/proc/drone_hud(ui_style = 'icons/mob/screen_midnight.dmi') - adding = list() - - var/obj/screen/using - var/obj/screen/inventory/inv_box - - using = new /obj/screen() - using.name = "drop" - using.icon = ui_style - using.icon_state = "act_drop" - using.screen_loc = ui_drone_drop - using.layer = 19 - adding += using - - mymob.pullin = new /obj/screen() - mymob.pullin.icon = ui_style - mymob.pullin.icon_state = "pull0" - mymob.pullin.name = "pull" - mymob.pullin.screen_loc = ui_drone_pull - adding += mymob.pullin - - inv_box = new /obj/screen/inventory() - inv_box.name = "r_hand" - inv_box.icon = ui_style - inv_box.icon_state = "hand_r_inactive" - if(mymob && !mymob.hand) //Hand being true means the LEFT hand is active - inv_box.icon_state = "hand_r_active" - inv_box.screen_loc = ui_rhand - inv_box.slot_id = slot_r_hand - inv_box.layer = 19 - r_hand_hud_object = inv_box - adding += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "l_hand" - inv_box.icon = ui_style - inv_box.icon_state = "hand_l_inactive" - if(mymob && mymob.hand) //Hand being true means the LEFT hand is active - inv_box.icon_state = "hand_l_active" - inv_box.screen_loc = ui_lhand - inv_box.slot_id = slot_l_hand - inv_box.layer = 19 - l_hand_hud_object = inv_box - adding += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "internal storage" - inv_box.icon = ui_style - inv_box.icon_state = "suit_storage" - inv_box.screen_loc = ui_drone_storage - inv_box.slot_id = "drone_storage_slot" - inv_box.layer = 19 - adding += inv_box - - inv_box = new /obj/screen/inventory() - inv_box.name = "head/mask" - inv_box.icon = ui_style - inv_box.icon_state = "mask" - inv_box.screen_loc = ui_drone_head - inv_box.slot_id = slot_head - inv_box.layer = 19 - adding += inv_box - - using = new /obj/screen/inventory() - using.name = "hand" - using.icon = ui_style - using.icon_state = "swap_1_m" - using.screen_loc = ui_swaphand1 - using.layer = 19 - adding += using - - using = new /obj/screen/inventory() - using.name = "hand" - using.icon = ui_style - using.icon_state = "swap_2" - using.screen_loc = ui_swaphand2 - using.layer = 19 - adding += using - - mymob.zone_sel = new /obj/screen/zone_sel() - mymob.zone_sel.icon = ui_style - mymob.zone_sel.update_icon() - - mymob.client.screen = null - mymob.client.screen += adding diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index f67e07c11b8..b894effd228 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -83,3 +83,18 @@ new /obj/item/stack/cable_coil(src,30,color) new /obj/item/weapon/wirecutters(src) new /obj/item/device/multitool(src) + +/obj/item/weapon/storage/toolbox/drone + name = "mechanical toolbox" + icon_state = "blue" + item_state = "toolbox_blue" + +/obj/item/weapon/storage/toolbox/drone/New() + ..() + new /obj/item/weapon/screwdriver(src) + new /obj/item/weapon/wrench(src) + new /obj/item/weapon/weldingtool(src) + new /obj/item/weapon/crowbar(src) + new /obj/item/stack/cable_coil(src,30,color) + new /obj/item/weapon/wirecutters(src) + new /obj/item/device/multitool(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/drone.dm b/code/modules/mob/living/simple_animal/friendly/drone.dm index c06b99fd1dd..1aa8836f4a7 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone.dm @@ -38,7 +38,7 @@ var/light_on = 0 var/obj/item/internal_storage //Drones can store one item, of any size/type in their body var/obj/item/head - var/obj/item/default_storage //If this exists, it will spawn in internal storage + var/obj/item/default_storage = /obj/item/weapon/storage/toolbox/drone //If this exists, it will spawn in internal storage var/obj/item/default_hatmask //If this exists, it will spawn in the hat/mask slot if it can fit @@ -71,7 +71,7 @@ switch(d_input) if("Reactivate") if(!client) - D << "This drone's OS has blue screened..." + D << "This drone's OS has blue screened, there is no point in repairing them." return D.visible_message("[D] begins to reactivate [src].") if(do_after(user,30,needhand = 1)) @@ -182,10 +182,7 @@ src << laws -/mob/living/simple_animal/drone/verb/toggle_light() - set category = "Drone" - set name = "Toggle drone light" - +/mob/living/simple_animal/drone/proc/toggle_light() if(light_on) AddLuminosity(-4) else diff --git a/tgstation.dme b/tgstation.dme index 859dcada271..e6150578251 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -76,6 +76,7 @@ #include "code\_onclick\hud\ai.dm" #include "code\_onclick\hud\alien.dm" #include "code\_onclick\hud\alien_larva.dm" +#include "code\_onclick\hud\drones.dm" #include "code\_onclick\hud\hud.dm" #include "code\_onclick\hud\human.dm" #include "code\_onclick\hud\monkey.dm"