mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
Adds 90% of the stuff
This commit is contained in:
@@ -786,3 +786,24 @@
|
||||
/datum/AI_Module/large/cameracrack/upgrade(mob/living/silicon/ai/AI)
|
||||
if(AI.builtInCamera)
|
||||
QDEL_NULL(AI.builtInCamera)
|
||||
|
||||
/datum/AI_Module/large/cameracrack
|
||||
module_name = "Engineering Cyborg Emitter Upgrade"
|
||||
mod_pick_name = "emitter"
|
||||
description = "Downloads firmwear that activates the built in emitter in all enginering cyborgs linked to you. Cyborgs built after this upgrade will have it."
|
||||
cost = 50 // IDK look into this
|
||||
one_purchase = TRUE
|
||||
upgrade = TRUE
|
||||
unlock_text = "<span class='notice'>Firmwear downloaded. Bugs removed. Built in emitters operating at 73% efficency.</span>"
|
||||
unlock_sound = 'sound/items/rped.ogg'
|
||||
|
||||
/datum/AI_Module/large/cameracrack/upgrade(mob/living/silicon/ai/AI)
|
||||
AI.purchased_modules += /obj/item/robot_module/engineering
|
||||
log_game("[key_name(usr)] purchased emitters for all engineering cyborgs.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] purchased emitters for all engineering cyborgs!</span>")
|
||||
for(var/mob/living/silicon/robot/R in AI.connected_robots)
|
||||
if(!istype(R.module, /obj/item/robot_module/engineering))
|
||||
continue
|
||||
R.module.malfhacked = TRUE
|
||||
R.module.rebuild_modules()
|
||||
to_chat(R, "<span class='notice'>New firmwear downloaded. Emitter is now online.</span>")
|
||||
|
||||
@@ -79,6 +79,9 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
|
||||
/// List of modules the AI has purchased malf upgrades for.
|
||||
var/list/purchased_modules = list()
|
||||
|
||||
var/mob/living/silicon/ai/parent = null
|
||||
var/camera_light_on = 0
|
||||
var/list/obj/machinery/camera/lit_cameras = list()
|
||||
|
||||
@@ -1264,6 +1264,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
connected_ai = AI
|
||||
connected_ai.connected_robots |= src
|
||||
notify_ai(1)
|
||||
if(module)
|
||||
module.rebuild_modules() //This way, if a borg gets linked to a malf AI that has upgrades, they get their upgrades.
|
||||
sync()
|
||||
|
||||
/mob/living/silicon/robot/adjustOxyLoss(amount)
|
||||
|
||||
@@ -6,12 +6,17 @@
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
|
||||
/// Has the AI hacked the borg module, allowing access to the malf AI exclusive item.
|
||||
var/malfhacked = FALSE
|
||||
|
||||
/// A list of all currently usable and created modules the robot currently has access too.
|
||||
var/list/modules = list()
|
||||
/// A list of module-specific, non-emag modules the borg will gain when this module is chosen.
|
||||
var/list/basic_modules = list()
|
||||
/// A list of modules the robot gets when emagged.
|
||||
var/list/emag_modules = list()
|
||||
/// A list of modules that the robot gets when malf AI buys it.
|
||||
var/list/malf_modules = list()
|
||||
/// A list of modules that require special recharge handling. Examples include things like flashes, sprays and welding tools.
|
||||
var/list/special_rechargables = list()
|
||||
/// A list of all "energy stacks", i.e metal, glass, brute kits, splints, etc.
|
||||
@@ -43,12 +48,17 @@
|
||||
emag_modules += I
|
||||
emag_modules -= i
|
||||
|
||||
for(var/i in malf_modules)
|
||||
var/obj/item/I = new i(src)
|
||||
malf_modules += I
|
||||
malf_modules -= i
|
||||
|
||||
// Flashes need a special recharge, and since basically every module uses it, add it here.
|
||||
// Even if the module doesn't use a flash, it wont cause any issues to have it in this list.
|
||||
special_rechargables += /obj/item/flash/cyborg
|
||||
|
||||
// This is done so we can loop through this list later and call cyborg_recharge() on the items while the borg is recharging.
|
||||
var/all_modules = basic_modules | emag_modules
|
||||
var/all_modules = basic_modules | emag_modules | malf_modules
|
||||
for(var/path in special_rechargables)
|
||||
var/obj/item/I = locate(path) in all_modules
|
||||
if(I) // If it exists, add the object reference.
|
||||
@@ -70,6 +80,7 @@
|
||||
QDEL_LIST(modules)
|
||||
QDEL_LIST(basic_modules)
|
||||
QDEL_LIST(emag_modules)
|
||||
QDEL_LIST(malf_modules)
|
||||
QDEL_LIST(storages)
|
||||
QDEL_LIST(special_rechargables)
|
||||
return ..()
|
||||
@@ -88,6 +99,7 @@
|
||||
var/list/lists = list(
|
||||
basic_modules,
|
||||
emag_modules,
|
||||
malf_modules,
|
||||
storages,
|
||||
special_rechargables
|
||||
)
|
||||
@@ -155,13 +167,19 @@
|
||||
return I
|
||||
|
||||
/**
|
||||
* Builds the usable module list from the modules we have in `basic_modules` and `emag_modules`
|
||||
* Builds the usable module list from the modules we have in `basic_modules`, `emag_modules` and `malf_modules`
|
||||
*/
|
||||
/obj/item/robot_module/proc/rebuild_modules()
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
R.uneq_all()
|
||||
modules = list()
|
||||
|
||||
if(!malfhacked)
|
||||
if(R.connected_ai)
|
||||
for(var/I in R.connected_ai.purchased_modules)
|
||||
if(istype(src, I))
|
||||
malfhacked = TRUE
|
||||
|
||||
// By this point these lists should only contain items. It's safe to use typeless loops here.
|
||||
for(var/item in basic_modules)
|
||||
add_module(item, FALSE)
|
||||
@@ -170,6 +188,10 @@
|
||||
for(var/item in emag_modules)
|
||||
add_module(item, FALSE)
|
||||
|
||||
if(malfhacked)
|
||||
for(var/item in malf_modules)
|
||||
add_module(item, FALSE)
|
||||
|
||||
if(R.hud_used)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
@@ -354,8 +376,9 @@
|
||||
/obj/item/stack/sheet/glass/cyborg,
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
)
|
||||
emag_modules = list(/obj/item/borg/stun)
|
||||
special_rechargables = list(/obj/item/extinguisher, /obj/item/weldingtool/largetank/cyborg)
|
||||
emag_modules = list(/obj/item/borg/stun, /obj/item/restraints/handcuffs/cable/zipties/cyborg)
|
||||
malf_modules = list(/obj/item/gun/energy/emitter/cyborg)
|
||||
special_rechargables = list(/obj/item/extinguisher, /obj/item/weldingtool/largetank/cyborg, /obj/item/gun/energy/emitter/cyborg)
|
||||
|
||||
/obj/item/robot_module/engineering/handle_death(mob/living/silicon/robot/R, gibbed)
|
||||
var/obj/item/gripper/G = locate(/obj/item/gripper) in modules
|
||||
@@ -400,7 +423,7 @@
|
||||
/obj/item/holosign_creator,
|
||||
/obj/item/extinguisher/mini
|
||||
)
|
||||
emag_modules = list(/obj/item/reagent_containers/spray/cyborg_lube)
|
||||
emag_modules = list(/obj/item/reagent_containers/spray/cyborg_lube, /obj/item/restraints/handcuffs/cable/zipties/cyborg)
|
||||
special_rechargables = list(
|
||||
/obj/item/lightreplacer,
|
||||
/obj/item/reagent_containers/spray/cyborg_lube,
|
||||
@@ -471,7 +494,7 @@
|
||||
/obj/item/storage/bag/tray/cyborg,
|
||||
/obj/item/reagent_containers/food/drinks/shaker
|
||||
)
|
||||
emag_modules = list(/obj/item/reagent_containers/food/drinks/cans/beer/sleepy_beer)
|
||||
emag_modules = list(/obj/item/reagent_containers/food/drinks/cans/beer/sleepy_beer, /obj/item/restraints/handcuffs/cable/zipties/cyborg)
|
||||
special_rechargables = list(
|
||||
/obj/item/reagent_containers/food/condiment/enzyme,
|
||||
/obj/item/reagent_containers/food/drinks/cans/beer/sleepy_beer
|
||||
@@ -530,7 +553,7 @@
|
||||
/obj/item/gun/energy/kinetic_accelerator/cyborg,
|
||||
/obj/item/gps/cyborg
|
||||
)
|
||||
emag_modules = list(/obj/item/borg/stun, /obj/item/pickaxe/drill/cyborg/diamond)
|
||||
emag_modules = list(/obj/item/borg/stun, /obj/item/pickaxe/drill/cyborg/diamond, /obj/item/restraints/handcuffs/cable/zipties/cyborg)
|
||||
special_rechargables = list(/obj/item/extinguisher/mini, /obj/item/weldingtool/mini)
|
||||
|
||||
// Replace their normal drill with a diamond drill.
|
||||
|
||||
@@ -271,6 +271,14 @@
|
||||
delay = 50
|
||||
select_name = "snipe"
|
||||
|
||||
/obj/item/ammo_casing/energy/emitter
|
||||
projectile_type = /obj/item/projectile/beam/emitter
|
||||
muzzle_flash_color = LIGHT_COLOR_GREEN
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
e_cost = 500 // about 28 shots on an engineering borg from a borging machine, assuming some power is used for lights / movement. May need to change.
|
||||
delay = 3 SECONDS // Lasers fire every second
|
||||
select_name = "emitter"
|
||||
|
||||
/obj/item/ammo_casing/energy/bsg
|
||||
projectile_type = /obj/item/projectile/energy/bsg
|
||||
muzzle_flash_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
@@ -141,6 +141,27 @@
|
||||
name = "cyborg immolator cannon"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/immolator/scatter/cyborg, /obj/item/ammo_casing/energy/immolator/strong/cyborg) // scatter is default, because it is more useful
|
||||
|
||||
/obj/item/gun/energy/emitter
|
||||
name = "mobile emitter"
|
||||
desc = "An emitter someone removed from its base, and an attached to a power cell, to try to make a weapon."
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
can_holster = FALSE
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/emitter)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/gun/energy/emitter/cyborg
|
||||
name = "mounted emitter"
|
||||
desc = "An emitter mounted to your cyborg frame, draining charge from your cell."
|
||||
|
||||
/obj/item/gun/energy/emitter/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/obj/item/gun/energy/emitter/cyborg/emp_act()
|
||||
return
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user