Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into pewPEWPEWboom

Attempt to resolve merge conflict.
This commit is contained in:
Atlantiscze
2014-12-07 04:33:46 +01:00
252 changed files with 15435 additions and 14517 deletions

View File

@@ -1769,7 +1769,7 @@
else
var/atom/O = new path(target)
if(O)
O.dir = obj_dir
O.set_dir(obj_dir)
if(obj_name)
O.name = obj_name
if(istype(O,/mob))

View File

@@ -60,7 +60,7 @@
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam((holder ? holder.loc : loc) )
I.master = src
I.density = 1
I.dir = dir
I.set_dir(dir)
step(I, I.dir)
if(I)
I.density = 0
@@ -85,14 +85,14 @@
Move()
var/t = dir
..()
dir = t
set_dir(t)
del(first)
return
holder_movement()
if(!holder) return 0
// dir = holder.dir
// set_dir(holder.dir)
del(first)
return 1
@@ -151,7 +151,7 @@
set category = "Object"
set src in usr
dir = turn(dir, 90)
set_dir(turn(dir, 90))
return
@@ -213,7 +213,7 @@
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
I.master = master
I.density = 1
I.dir = dir
I.set_dir(dir)
//world << "created new beam \ref[I] at [I.x] [I.y] [I.z]"
step(I, I.dir)

View File

@@ -120,13 +120,13 @@ obj/machinery/gateway/centerstation/process()
if(!awaygate) return
if(awaygate.calibrated)
M.loc = get_step(awaygate.loc, SOUTH)
M.dir = SOUTH
M.set_dir(SOUTH)
return
else
var/obj/effect/landmark/dest = pick(awaydestinations)
if(dest)
M.loc = dest.loc
M.dir = SOUTH
M.set_dir(SOUTH)
use_power(5000)
return
@@ -222,7 +222,7 @@ obj/machinery/gateway/centerstation/process()
M << "\black The station gate has detected your exile implant and is blocking your entry."
return
M.loc = get_step(stationgate.loc, SOUTH)
M.dir = SOUTH
M.set_dir(SOUTH)
/obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob)

View File

@@ -299,5 +299,6 @@
'icons/spideros_icons/sos_12.png',
'icons/spideros_icons/sos_13.png',
'icons/spideros_icons/sos_14.png',
'html/images/ntlogo.png'
'html/images/ntlogo.png',
'html/images/talisman.png'
)

View File

@@ -747,6 +747,12 @@ var/global/list/gear_datums = list()
sort_category = "utility"
cost = 1
/datum/gear/paicard
display_name = "personal AI device"
path = /obj/item/device/paicard
sort_category = "utility"
cost = 2
// The rest of the trash.
/datum/gear/ashtray
@@ -837,4 +843,4 @@ var/global/list/gear_datums = list()
path = /obj/item/clothing/ears/skrell/cloth_female
cost = 2
sort_category = "ears"
whitelisted = "Skrell"
whitelisted = "Skrell"

View File

@@ -144,7 +144,7 @@
desc = O.desc
icon = O.icon
icon_state = O.icon_state
dir = O.dir
set_dir(O.dir)
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
@@ -244,6 +244,7 @@ BLIND // can't see anything
w_class = 2.0
var/light_overlay = "helmet_light"
var/light_applied
var/brightness_on
var/on = 0
@@ -254,40 +255,54 @@ BLIND // can't see anything
/obj/item/clothing/head/attack_self(mob/user)
if(brightness_on)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
user << "You cannot turn the light on while in this [user.loc]"
return
on = !on
overlays.Cut()
if(on)
if(!light_overlay_cache["[light_overlay]_icon"])
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
if(!light_overlay_cache["[light_overlay]"])
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
overlays |= light_overlay_cache["[light_overlay]_icon"]
user.SetLuminosity(user.luminosity + brightness_on)
else
user.SetLuminosity(user.luminosity - brightness_on)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_head()
user << "You [on ? "enable" : "disable"] the helmet light."
update_light(user)
else
return ..(user)
/obj/item/clothing/head/proc/update_light(mob/user)
if(!brightness_on)
return
if(on)
if(light_overlay) overlays |= light_overlay
user.SetLuminosity(user.luminosity - brightness_on)
/obj/item/clothing/head/proc/update_light(var/mob/user = null)
if(on && !light_applied)
if(loc == user)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(brightness_on)
light_applied = 1
else if(!on && light_applied)
if(loc == user)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(0)
light_applied = 0
update_icon(user)
/obj/item/clothing/head/equipped(mob/user)
..()
spawn(1)
if(on && loc == user && !light_applied)
user.SetLuminosity(user.luminosity + brightness_on)
light_applied = 1
/obj/item/clothing/head/dropped(mob/user)
..()
spawn(1)
if(on && loc != user && light_applied)
user.SetLuminosity(user.luminosity - brightness_on)
light_applied = 0
/obj/item/clothing/head/update_icon(var/mob/user)
overlays.Cut()
if(on)
if(!light_overlay_cache["[light_overlay]_icon"])
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
if(!light_overlay_cache["[light_overlay]"])
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
overlays |= light_overlay_cache["[light_overlay]_icon"]
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_head()
/obj/item/clothing/head/equipped(mob/user)
..()
@@ -545,5 +560,4 @@ BLIND // can't see anything
/obj/item/clothing/under/emp_act(severity)
if (hastie)
hastie.emp_act(severity)
..()
..()

View File

@@ -4,28 +4,28 @@
icon_state = "magboots0"
species_restricted = null
var/magpulse = 0
var/icon_base = "magboots"
icon_action_button = "action_blank"
action_button_name = "Toggle the magboots"
// flags = NOSLIP //disabled by default
attack_self(mob/user)
if(magpulse)
flags &= ~NOSLIP
slowdown = SHOES_SLOWDOWN
magpulse = 0
icon_state = "magboots0"
user << "You disable the mag-pulse traction system."
else
flags |= NOSLIP
slowdown = 2
magpulse = 1
icon_state = "magboots1"
user << "You enable the mag-pulse traction system."
user.update_inv_shoes() //so our mob-overlays update
examine(mob/user)
..(user)
var/state = "disabled"
if(src.flags&NOSLIP)
state = "enabled"
user << "Its mag-pulse traction system appears to be [state]."
/obj/item/clothing/shoes/magboots/attack_self(mob/user)
if(magpulse)
flags &= ~NOSLIP
slowdown = SHOES_SLOWDOWN
magpulse = 0
if(icon_base) icon_state = "[icon_base]0"
user << "You disable the mag-pulse traction system."
else
flags |= NOSLIP
slowdown = 2
magpulse = 1
if(icon_base) icon_state = "[icon_base]1"
user << "You enable the mag-pulse traction system."
user.update_inv_shoes() //so our mob-overlays update
/obj/item/clothing/shoes/magboots/examine(mob/user)
..(user)
var/state = "disabled"
if(src.flags&NOSLIP)
state = "enabled"
user << "Its mag-pulse traction system appears to be [state]."

View File

@@ -103,7 +103,7 @@
return 1
// Okay, it wasn't a terminal being touched, check for all the simple insertions.
if(input_device.type in list(/obj/item/device/paicard, /obj/item/device/mmi, /obj/item/device/mmi/posibrain))
if(input_device.type in list(/obj/item/device/paicard, /obj/item/device/mmi, /obj/item/device/mmi/digital/posibrain))
integrate_ai(input_device,user)
return 1
@@ -291,7 +291,7 @@
toggleable = 1
usable = 0
engage_string = "Enable Countermeasures"
activate_string = "Enable Countermeasures"
deactivate_string = "Disable Countermeasures"
interface_name = "electrowarfare system"
@@ -322,7 +322,7 @@
activates_on_touch = 1
disruptive = 0
engage_string = "Enable Power Sink"
activate_string = "Enable Power Sink"
deactivate_string = "Disable Power Sink"
interface_name = "niling d-sink"

View File

@@ -173,6 +173,14 @@
/obj/item/rig_module/self_destruct/engage()
explosion(get_turf(src), 0, 0, 3, 4)
if(holder && holder.wearer)
holder.wearer.drop_from_inventory(src)
del(holder)
del(src)
/obj/item/rig_module/self_destruct/small/engage()
explosion(get_turf(src), 0, 0, 1, 2)
explosion(get_turf(src), 0, 0, 1, 2)
if(holder && holder.wearer)
holder.wearer.drop_from_inventory(src)
del(holder)
del(src)

View File

@@ -279,7 +279,7 @@
disruptive = 0
suit_overlay_active = "maneuvering_active"
suit_overlay_inactive = "maneuvering_inactive"
suit_overlay_inactive = null //"maneuvering_inactive"
engage_string = "Toggle Stabilizers"
activate_string = "Activate Thrusters"

View File

@@ -32,14 +32,14 @@
var/list/initial_modules
var/chest_type = /obj/item/clothing/suit/space/rig
var/helm_type = /obj/item/clothing/head/helmet/space/rig
var/boot_type = /obj/item/clothing/shoes/rig
var/boot_type = /obj/item/clothing/shoes/magboots/rig
var/glove_type = /obj/item/clothing/gloves/rig
var/cell_type = /obj/item/weapon/cell/high
var/air_type = /obj/item/weapon/tank/oxygen
//Component/device holders.
var/obj/item/weapon/tank/air_supply // Air tank, if any.
var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any.
var/obj/item/clothing/shoes/boots = null // Deployable boots, if any.
var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any.
var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any.
var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any.
@@ -63,6 +63,7 @@
var/malfunction_delay = 0
var/electrified = 0
var/locked_down = 0
var/locked_dna = null
var/sealing // Keeps track of seal status independantly of canremove.
var/offline = 1 // Should we be applying suit maluses?
@@ -122,6 +123,8 @@
verbs |= /obj/item/weapon/rig/proc/toggle_boots
if(chest_type)
chest = new chest_type(src)
if(allowed)
chest.allowed = allowed
verbs |= /obj/item/weapon/rig/proc/toggle_chest
for(var/obj/item/piece in list(gloves,helmet,boots,chest))
@@ -137,12 +140,6 @@
piece.siemens_coefficient = siemens_coefficient
piece.permeability_coefficient = permeability_coefficient
spawn(1)
var/mob/M = loc
if(istype(M))
toggle_seals(M,1)
update_icon()
/obj/item/weapon/rig/Del()
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
var/mob/living/M = piece.loc
@@ -155,13 +152,13 @@
/obj/item/weapon/rig/proc/suit_is_deployed()
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
return 0
if(helm_type && (!helmet || wearer.head != helmet))
if(helm_type && !(helmet && wearer.head == helmet))
return 0
if(glove_type && (!gloves || wearer.gloves != gloves))
if(glove_type && !(gloves && wearer.gloves == gloves))
return 0
if(boot_type && (!boots || wearer.shoes != boots))
if(boot_type && !(boots && wearer.shoes == boots))
return 0
if(chest_type && (!chest || wearer.wear_suit != chest))
if(chest_type && !(chest && wearer.wear_suit == chest))
return 0
return 1
@@ -169,9 +166,6 @@
if(sealing) return
if(M && !(istype(M) && M.back == src ) && !istype(M,/mob/living/silicon) )
return 0
if(!check_power_cost(M))
return 0
@@ -187,30 +181,25 @@
M << "<span class='danger'>The suit flashes an error light. It can't function properly without being fully deployed.</span>"
failed_to_seal = 1
if(!failed_to_seal && instant)
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]_sealed"
update_icon()
if(!failed_to_seal)
else if(!failed_to_seal)
M << "<font color='blue'>With a quiet hum, the suit begins running checks and adjusting components.</font>"
if(!do_after(M,SEAL_DELAY))
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
failed_to_seal = 1
if(!instant)
M << "<font color='blue'>With a quiet hum, the suit begins running checks and adjusting components.</font>"
if(!do_after(M,SEAL_DELAY))
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
failed_to_seal = 1
if(!M)
failed_to_seal = 1
else
for(var/list/piece_data in list(list(M.shoes,boots,"boots"),list(M.gloves,gloves,"gloves"),list(M.head,helmet,"helmet"),list(M.wear_suit,chest,"chest")))
for(var/list/piece_data in list(list(M.shoes,boots,"boots",boot_type),list(M.gloves,gloves,"gloves",glove_type),list(M.head,helmet,"helmet",helm_type),list(M.wear_suit,chest,"chest",chest_type)))
var/obj/item/piece = piece_data[1]
var/obj/item/compare_piece = piece_data[2]
var/msg_type = piece_data[3]
var/piece_type = piece_data[4]
if(!piece)
if(!piece || !piece_type)
continue
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
@@ -219,7 +208,12 @@
failed_to_seal = 1
break
if(M.back == src && piece == compare_piece && do_after(M,SEAL_DELAY))
if(M.back == src && piece == compare_piece)
if(!instant)
if(!do_after(M,SEAL_DELAY))
failed_to_seal = 1
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
switch(msg_type)
if("boots")
@@ -234,15 +228,17 @@
if("helmet")
M << "<font color='blue'>\The [piece] hisses [!seal_target ? "closed" : "open"].</font>"
M.update_inv_head()
if(!seal_target)
if(flags & AIRTIGHT)
helmet.flags |= AIRTIGHT
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
helmet.body_parts_covered |= (FACE|EYES)
else
helmet.flags &= ~AIRTIGHT
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
helmet.body_parts_covered &= ~(FACE|EYES)
if(helmet)
if(!seal_target)
if(flags & AIRTIGHT)
helmet.flags |= AIRTIGHT
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
helmet.body_parts_covered |= (FACE|EYES)
else
helmet.flags &= ~AIRTIGHT
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
helmet.body_parts_covered &= ~(FACE|EYES)
helmet.update_light(wearer)
else
failed_to_seal = 1
@@ -287,6 +283,10 @@
piece.flags |= AIRTIGHT
update_icon(1)
if(instant && air_supply)
wearer.internals = air_supply
wearer.internals.icon_state = "internal1"
/obj/item/weapon/rig/process()
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
@@ -437,7 +437,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 800, 600)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -472,45 +472,59 @@
wearer.update_inv_back()
return
/obj/item/weapon/rig/proc/check_suit_access(var/mob/living/carbon/human/user)
if(!security_check_enabled)
return 1
if(istype(user))
if(user.back != src)
return 0
if(locked_dna)
if(!user.dna || user.dna.unique_enzymes != locked_dna)
user << "<span class='danger'>DNA scan mismatch. Access denied.</span>"
return 0
else if(!src.allowed(user))
user << "<span class='danger'>Unauthorized user. Access denied.</span>"
return 0
else if(user.loc && user.loc.loc && istype(user.loc.loc,/obj/item/rig_module/ai_container))
if(!ai_override_enabled)
user << "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>"
return 0
return 1
/obj/item/weapon/rig/Topic(href,href_list)
var/mob/living/carbon/human/H = usr
if(!check_suit_access(usr))
return
if((istype(H) && H.back == src) || (istype(H,/mob/living/silicon)))
if(href_list["toggle_piece"])
toggle_piece(href_list["toggle_piece"], usr)
else if(href_list["toggle_seals"])
toggle_seals(usr)
else if(href_list["interact_module"])
if(istype(H,/mob/living/silicon))
if(!control_overridden)
usr << "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>"
return
else if(security_check_enabled && !src.allowed(usr))
usr << "<span class='danger'>Access denied.</span>"
return
var/module_index = text2num(href_list["interact_module"])
if(href_list["toggle_piece"])
toggle_piece(href_list["toggle_piece"], H)
else if(href_list["toggle_seals"])
toggle_seals(H)
else if(href_list["interact_module"])
var/module_index = text2num(href_list["interact_module"])
if(module_index > 0 && module_index <= installed_modules.len)
var/obj/item/rig_module/module = installed_modules[module_index]
switch(href_list["module_mode"])
if("activate")
module.activate()
if("deactivate")
module.deactivate()
if("engage")
module.engage()
if("select")
selected_module = module
if("select_charge_type")
module.charge_selected = href_list["charge_type"]
else if(href_list["toggle_ai_control"])
ai_override_enabled = !ai_override_enabled
else if(href_list["toggle_suit_lock"])
security_check_enabled = !security_check_enabled
if(module_index > 0 && module_index <= installed_modules.len)
var/obj/item/rig_module/module = installed_modules[module_index]
switch(href_list["module_mode"])
if("activate")
module.activate()
if("deactivate")
module.deactivate()
if("engage")
module.engage()
if("select")
selected_module = module
if("select_charge_type")
module.charge_selected = href_list["charge_type"]
else if(href_list["toggle_ai_control"])
ai_override_enabled = !ai_override_enabled
else if(href_list["toggle_suit_lock"])
locked = !locked
usr.set_machine(src)
src.add_fingerprint(usr)

View File

@@ -20,6 +20,7 @@
user << "<span class='danger'>It looks like the locking system has been shorted out.</span>"
return
else if(istype(W, /obj/item/weapon/card/emag))
locked_dna = null
req_access = null
req_one_access = null
locked = 0

View File

@@ -21,12 +21,13 @@
species_restricted = null
gender = PLURAL
/obj/item/clothing/shoes/rig
/obj/item/clothing/shoes/magboots/rig
name = "boots"
cold_protection = FEET
heat_protection = FEET
species_restricted = null
gender = PLURAL
icon_base = null
/obj/item/clothing/suit/space/rig
name = "chestpiece"

View File

@@ -27,8 +27,7 @@
usr << "<span class='warning'>The suit is not active.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
if(!visor)
@@ -51,8 +50,7 @@
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
toggle_piece("helmet",wearer)
@@ -64,8 +62,7 @@
set category = "Hardsuit"
set src = usr.contents
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
toggle_piece("chest",wearer)
@@ -81,8 +78,7 @@
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
toggle_piece("gauntlets",wearer)
@@ -98,8 +94,7 @@
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
toggle_piece("boots",wearer)
@@ -115,8 +110,7 @@
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
if(!check_power_cost(usr))
@@ -135,8 +129,7 @@
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
return
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
wearer << "<span class='danger'>Access denied.</span>"
if(!check_suit_access(usr))
return
toggle_seals(wearer)

View File

@@ -16,4 +16,4 @@
icon_state = "breacher_rig"
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
vision_restriction = 0
offline_vision_restriction = 2
slowdown = 4

View File

@@ -12,6 +12,7 @@
offline_vision_restriction = 1
helm_type = /obj/item/clothing/head/helmet/space/rig/combat
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
initial_modules = list(
/obj/item/rig_module/mounted,
@@ -28,6 +29,7 @@
desc = "A blood-red hardsuit featuring some fairly illegal technology."
icon_state = "merc_rig"
suit_type = "crimson hardsuit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
initial_modules = list(
/obj/item/rig_module/mounted,

View File

@@ -36,8 +36,7 @@
/obj/item/rig_module/ai_container,
/obj/item/rig_module/maneuvering_jets,
/obj/item/rig_module/device/plasmacutter,
/obj/item/rig_module/device/rcd,
/obj/item/rig_module/foam_sprayer
/obj/item/rig_module/device/rcd
)
/obj/item/weapon/rig/ert/medical

View File

@@ -13,7 +13,7 @@
chest_type = /obj/item/clothing/suit/space/rig/light
helm_type = /obj/item/clothing/head/helmet/space/rig/light
boot_type = /obj/item/clothing/shoes/rig/light
boot_type = /obj/item/clothing/shoes/magboots/rig/light
glove_type = /obj/item/clothing/gloves/rig/light
/obj/item/clothing/suit/space/rig/light
@@ -22,7 +22,7 @@
/obj/item/clothing/gloves/rig/light
name = "gloves"
/obj/item/clothing/shoes/rig/light
/obj/item/clothing/shoes/magboots/rig/light
name = "shoes"
/obj/item/clothing/head/helmet/space/rig/light
@@ -53,7 +53,6 @@
suit_type = "ominous"
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
icon_state = "ninja_rig"
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
slowdown = 0

View File

@@ -8,6 +8,8 @@
offline_slowdown = 10
offline_vision_restriction = 2
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
req_access = null
req_one_access = null
@@ -31,6 +33,8 @@
offline_slowdown = 0
offline_vision_restriction = 0
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
req_access = list(access_ce)
initial_modules = list(
@@ -49,12 +53,15 @@
name = "AMI control module"
suit_type = "hazmat"
desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it."
icon_state = "science_rig"
icon_state = "medical_rig" //placeholder
armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100)
slowdown = 1
offline_slowdown = 3
offline_vision_restriction = 1
//Todo: add xenoarch gear.
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
req_access = list(access_rd)
initial_modules = list(

View File

@@ -49,4 +49,134 @@
//Breach thresholds, should ideally be inherited by most (if not all) voidsuits.
breach_threshold = 18
can_breach = 1
can_breach = 1
//Inbuilt devices.
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any.
/obj/item/clothing/suit/space/void/equipped(mob/M)
..()
var/mob/living/carbon/human/H = M
if(!istype(H)) return
if(H.wear_suit != src)
return
if(helmet)
if(H.head)
M << "You are unable to deploy your suit's helmet as \the [H.head] is in the way."
else
M << "Your suit's helmet deploys with a hiss."
//TODO: Species check, skull damage for forcing an unfitting helmet on?
helmet.loc = H
H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
if(boots)
if(H.shoes)
M << "You are unable to deploy your suit's magboots as \the [H.shoes] are in the way."
else
M << "Your suit's boots deploy with a hiss."
boots.loc = H
H.equip_to_slot(boots, slot_shoes)
boots.canremove = 0
/obj/item/clothing/suit/space/void/dropped()
..()
var/mob/living/carbon/human/H
if(helmet)
H = helmet.loc
if(istype(H))
if(helmet && H.head == helmet)
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.loc = src
if(boots)
H = boots.loc
if(istype(H))
if(boots && H.shoes == boots)
boots.canremove = 1
H.drop_from_inventory(boots)
boots.loc = src
/obj/item/clothing/suit/space/void/verb/toggle_helmet()
set name = "Toggle Helmet"
set category = "Object"
set src in usr
if(!istype(src.loc,/mob/living)) return
if(!helmet)
usr << "There is no helmet installed."
return
var/mob/living/carbon/human/H = usr
if(!istype(H)) return
if(H.stat) return
if(H.wear_suit != src) return
if(H.head == helmet)
H << "\blue You retract your suit helmet."
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.loc = src
else
if(H.head)
H << "<span class='danger'>You cannot deploy your helmet while wearing another helmet.</span>"
return
//TODO: Species check, skull damage for forcing an unfitting helmet on?
helmet.loc = H
helmet.pickup(H)
H.equip_to_slot(helmet, slot_head)
helmet.canremove = 0
H << "<font color='blue'><b>You deploy your suit helmet, sealing you off from the world.</b></font>"
helmet.update_light(H)
/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(user,/mob/living)) return
if(istype(src.loc,/mob/living))
user << "<span class='danger'>How do you propose to modify a hardsuit while it is being worn?</span>"
return
if(istype(W,/obj/item/weapon/screwdriver))
if(helmet)
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.loc = get_turf(src)
src.helmet = null
else if (boots)
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.loc = get_turf(src)
src.helmet = null
else
user << "\The [src] does not have anything installed."
return
else if(istype(W,/obj/item/clothing/head/helmet/space))
if(helmet)
user << "\The [src] already has a helmet installed."
else
user << "You attach \the [W] to \the [src]'s helmet mount."
user.drop_item()
W.loc = src
src.helmet = W
return
else if(istype(W,/obj/item/clothing/shoes/magboots))
if(boots)
user << "\The [src] already has magboots installed."
else
user << "You attach \the [W] to \the [src]'s boot mounts."
user.drop_item()
W.loc = src
boots = W
return
..()

View File

@@ -295,7 +295,7 @@ proc/check_panel(mob/M)
collapse()
continue
if(get_dist(src,my_target) > 1)
src.dir = get_dir(src,my_target)
src.set_dir(get_dir(src,my_target))
step_towards(src,my_target)
updateimage()
else

View File

@@ -156,24 +156,41 @@
//The next part of the code assumes there's ALWAYS an /area AND a /turf on a given tile
//first instance the /area and remove it from the members list
var/length = members.len
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[length])//preloader for assigning set variables on atom creation
//in case of multiples turfs on one tile,
//will contains the images of all underlying turfs, to simulate the DMM multiple tiles piling
var/list/turfs_underlays = list()
instance = locate(members[length])
//first instance the /area and remove it from the members list
index = members.len
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
instance = locate(members[index])
instance.contents.Add(locate(xcrd,ycrd,zcrd))
if(_preloader && instance)
_preloader.load(instance)
members.Remove(members[length])
members.Remove(members[index])
//then instance the /turf and remove it from the members list
length = members.len
//then instance the /turf and, if multiple tiles are presents, simulates the DMM underlays piling effect
var/first_turf_index = 1
while(!ispath(members[first_turf_index],/turf)) //find first /turf object in members
first_turf_index++
//instanciate the first /turf
var/turf/T = instance_atom(members[first_turf_index],members_attributes[first_turf_index],xcrd,ycrd,zcrd)
//if others /turf are presents, simulates the underlays piling effect
index = first_turf_index + 1
while(index <= members.len)
turfs_underlays.Insert(1,image(T.icon,null,T.icon_state,T.layer,T.dir))//add the current turf image to the underlays list
var/turf/UT = instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)//instance new turf
add_underlying_turf(UT,T,turfs_underlays)//simulates the DMM piling effect
T = UT
index++
instance_atom(members[length],members_attributes[length],xcrd,ycrd,zcrd)
members.Remove(members[length])
//Replace the previous part of the code with this if it's unsafe to assume tiles have ALWAYS an /area AND a /turf
/*while(members.len > 0)
@@ -203,8 +220,8 @@
*/
//finally instance all remainings objects/mobs
for(var/k=1,k<=members.len,k++)
instance_atom(members[k],members_attributes[k],xcrd,ycrd,zcrd)
for(index=1,index < first_turf_index,index++)
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
////////////////
//Helpers procs
@@ -220,6 +237,8 @@
if(_preloader && instance)//second preloader pass, as some variables may have been reset/changed by New()
_preloader.load(instance)
return instance
//text trimming (both directions) helper proc
//optionally removes quotes before and after the text (for variable name)
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
@@ -296,8 +315,16 @@
return to_return
//simulates the DM multiple turfs on one tile underlaying
/dmm_suite/proc/add_underlying_turf(var/turf/placed,var/turf/underturf, var/list/turfs_underlays)
if(underturf.density)
placed.density = 1
if(underturf.opacity)
placed.opacity = 1
placed.underlays += turfs_underlays
//atom creation method that preloads variables before creation
atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
/atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
if(istype(_dmm_preloader, /dmm_suite/preloader))
_dmm_preloader.load(src)
. = ..()
@@ -319,4 +346,4 @@ atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
what.vars[attribute] = attributes[attribute]
Del()
Del()

View File

@@ -388,5 +388,5 @@
usr << "It is anchored in place!"
return 0
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
return 1

View File

@@ -40,7 +40,8 @@
user << "That's an [src]."
user << desc
if(!istype(user, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
// Borgs can now check contents too.
if((!istype(user, /mob/living/carbon/human)) && (!istype(user, /mob/living/silicon/robot)))
return
if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them.

View File

@@ -22,6 +22,7 @@
universal_speak = 1
var/atom/movable/following = null
var/admin_ghosted = 0
var/anonsay = 0
/mob/dead/observer/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -168,7 +169,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(stat == DEAD)
announce_ghost_joinleave(ghostize(1))
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)","Are you sure you want to ghost?","Ghost","Stay in body")
var/response
if(src.client && src.client.holder)
response = alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", "Ghost", "Admin Ghost", "Stay in body")
if(response == "Admin Ghost")
if(!src.client)
return
src.client.admin_ghost()
else
response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost, you won't be able to play this round for another 30 minutes! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", "Ghost", "Stay in body")
if(response != "Ghost")
return
resting = 1
@@ -182,7 +191,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/Move(NewLoc, direct)
following = null
dir = direct
set_dir(direct)
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
@@ -580,8 +589,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
toggled_invisible = world.time
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible</span>")
else
src << "<span class='info>You are now visible</span>"
src << "<span class='info'>You are now visible</span>"
invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
// Give the ghost a cult icon which should be visible only to itself
toggle_icon("cult")
/mob/dead/observer/verb/toggle_anonsay()
set category = "Ghost"
set name = "Toggle Anonymous Chat"
set desc = "Toggles showing your key in dead chat."
src.anonsay = !src.anonsay
if(anonsay)
src << "<span class='info'>Your key won't be shown when you speak in dead chat.</span>"
else
src << "<span class='info'>Your key will be publicly visible again.</span>"

View File

@@ -1,5 +1,22 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/device/mmi/digital/New()
src.brainmob = new(src)
src.brainmob.add_language("Binary")
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.stat = 0
src.brainmob.silent = 0
dead_mob_list -= src.brainmob
/obj/item/device/mmi/digital/transfer_identity(var/mob/living/carbon/H)
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
if(H.mind)
H.mind.transfer_to(brainmob)
return
/obj/item/device/mmi
name = "Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."

View File

@@ -1,4 +1,4 @@
/obj/item/device/mmi/posibrain
/obj/item/device/mmi/digital/posibrain
name = "positronic brain"
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves."
icon = 'icons/obj/assemblies.dmi'
@@ -15,7 +15,7 @@
mecha = null//This does not appear to be used outside of reference in mecha.dm.
/obj/item/device/mmi/posibrain/attack_self(mob/user as mob)
/obj/item/device/mmi/digital/posibrain/attack_self(mob/user as mob)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
user << "\blue You carefully locate the manual activation switch and start the positronic brain's boot process."
@@ -24,7 +24,7 @@
src.request_player()
spawn(600) reset_search()
/obj/item/device/mmi/posibrain/proc/request_player()
/obj/item/device/mmi/digital/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
continue
@@ -34,7 +34,7 @@
if(O.client.prefs.be_special & BE_AI)
question(O.client)
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
/obj/item/device/mmi/digital/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
@@ -47,26 +47,15 @@
C.prefs.be_special ^= BE_AI
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
/*
Positronic brains should have posibrain-like name, instead of human-MMIlike names. -- ATL
name = "positronic brain ([H])"
brainmob.name = H.real_name
brainmob.real_name = H.real_name
*/
brainmob.dna = H.dna
brainmob.timeofhostdeath = H.timeofdeath
brainmob.stat = 0
/obj/item/device/mmi/digital/posibrain/transfer_identity(var/mob/living/carbon/H)
..()
if(brainmob.mind)
brainmob.mind.assigned_role = "Positronic Brain"
if(H.mind)
H.mind.transfer_to(brainmob)
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a metal cube."
brainmob << "<span class='notify'>You feel slightly disoriented. That's normal when you're just a metal cube.</span>"
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
/obj/item/device/mmi/digital/posibrain/proc/transfer_personality(var/mob/candidate)
announce_ghost_joinleave(candidate, 0, "They are occupying a positronic brain now.")
src.searching = 0
src.brainmob.mind = candidate.mind
@@ -83,7 +72,7 @@
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
/obj/item/device/mmi/digital/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
@@ -94,10 +83,10 @@
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/mmi/posibrain/examine(mob/user)
/obj/item/device/mmi/digital/posibrain/examine(mob/user)
if(!..(user))
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
@@ -113,7 +102,7 @@
user << msg
return
/obj/item/device/mmi/posibrain/emp_act(severity)
/obj/item/device/mmi/digital/posibrain/emp_act(severity)
if(!src.brainmob)
return
else
@@ -126,16 +115,7 @@
src.brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/mmi/posibrain/New()
src.brainmob = new(src)
src.brainmob.add_language("Binary")
/obj/item/device/mmi/digital/posibrain/New()
..()
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.stat = 0
src.brainmob.silent = 0
dead_mob_list -= src.brainmob
..()

View File

@@ -0,0 +1,19 @@
/obj/item/device/mmi/digital/robot
name = "robotic intelligence circuit"
desc = "The pinnacle of artifical intelligence which can be achieved using classical computer science."
icon = 'icons/obj/module.dmi'
icon_state = "mainboard"
w_class = 3
origin_tech = "engineering=4;materials=3;programming=4"
/obj/item/device/mmi/digital/robot/New()
..()
src.brainmob.name = "[pick(list("ADA","DOS","GNU","MAC","WIN"))]-[rand(1000, 9999)]"
src.brainmob.real_name = src.brainmob.name
/obj/item/device/mmi/digital/robot/transfer_identity(var/mob/living/carbon/H)
..()
if(brainmob.mind)
brainmob.mind.assigned_role = "Robotic Intelligence"
brainmob << "<span class='notify'>You feel slightly disoriented. That's normal when you're little more than a complex circuit.</span>"
return

View File

@@ -3,7 +3,7 @@
if (silent)
return
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
if(!(container && istype(container, /obj/item/device/mmi)))
return //No MMI, can't speak, bucko./N
else
if(prob(emp_damage*4))

View File

@@ -130,9 +130,9 @@
hud_used.l_hand_hud_object.icon_state = "hand_inactive"
hud_used.r_hand_hud_object.icon_state = "hand_active"
/*if (!( src.hand ))
src.hands.dir = NORTH
src.hands.set_dir(NORTH)
else
src.hands.dir = SOUTH*/
src.hands.set_dir(SOUTH)*/
return
/mob/living/carbon/proc/activate_hand(var/selhand) //0 or "r" or "right" for right hand; 1 or "l" or "left" for left hand.

View File

@@ -708,29 +708,6 @@
number += 2
return number
/mob/living/carbon/human/proc/magboot_stomp(mob/living/carbon/human/H as mob, datum/organ/external/affecting)
visible_message("\red [src] raises one of \his magboots over [H]'s [affecting.display_name]...")
attack_move = 1
if(do_after(usr, 20))
if(src.canmove && !src.lying && src.Adjacent(H) && H.lying)
visible_message("\red <B>[src] stomps \his magboot down on [H]'s [affecting.display_name] with full force!</B>")
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
playsound(loc, 'sound/weapons/genhit3.ogg', 25, 1, -1)
attack_move = 0
src.attack_log += text("\[[time_stamp()]\] <font color='red'>Magboot-stomped [H.name] ([H.ckey])</font>")
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been magboot-stomped by [src.name] ([src.ckey])</font>")
msg_admin_attack("[key_name(src)] magboot-stomped [key_name(H)]")
return 1
return 0
/mob/living/carbon/human/get_combat_buff(var/damage)
if(check_special_role("Ninja") || check_special_role("Changeling"))
damage += 3 // We assume Ninjas and Changelings are slightly better in combat than the usual human
if(HULK in mutations)
damage *= 2 // Hulks do twice the damage
return damage * damage_multiplier
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
if(species.has_fine_manipulation)
return 1

View File

@@ -100,115 +100,82 @@
attack = H.species.secondary_unarmed
if(!attack.is_usable(H))
return 0
if(attack_move) return 0
var/damage = rand(1, 5)
var/damage = rand(1, 5) + attack.damage
var/block = 0
var/accurate = 0
var/target_zone = check_zone(H.zone_sel.selecting) // The zone that was targeted
var/hit_zone = target_zone // The zone that is actually hit
var/hit_zone = H.zone_sel.selecting
var/datum/organ/external/affecting = get_organ(hit_zone)
// Check for magboot attack
if(src.lying && H.canmove && !H.lying && H.shoes && istype(H.shoes, /obj/item/clothing/shoes/magboots))
var/obj/item/clothing/shoes/magboots/mboots = H.shoes
if(mboots.magpulse)
return H.magboot_stomp(src, affecting)
switch(src.a_intent)
if("help")
// We didn't see this coming, so we get the full blow
damage = 5
damage = attack.damage
accurate = 1
if("hurt", "grab")
// We're in a fighting stance, there's a chance we block
if(prob(20) && src.canmove && !(src==H))
if(src.canmove && src!=H && prob(20))
block = 1
if (M.grabbed_by.len)
// Someone got a good grip on them, they won't be able to do much damage
damage = max(0, damage - 2)
damage = max(1, damage - 2)
if(src.grabbed_by.len || src.buckled || !src.canmove || src==H)
accurate = 1 // certain circumstances make it impossible for us to evade punches
// Process evasion and blocking
var/miss_type = 0
var/attack_message
if(!accurate)
/*
This is kind of convoluted, but it seems to break down like this:
(note that the chance to miss is exaggerated here since ran_zone() might roll "chest"
If aiming for chest:
80% chance you hit your target
17% chance you hit a random zone
3% chance you miss
If aiming for something else:
68% chance you hit your target
17% chance you hit a random zone
15% chance you miss
Why don't we just use get_zone_with_miss_chance() ???
*/
if(prob(80))
hit_zone = ran_zone(target_zone)
hit_zone = ran_zone(hit_zone)
if(prob(15) && hit_zone != "chest") // Missed!
playsound(loc, attack.miss_sound, 25, 1, -1)
var/atk_verb = pick(attack.attack_verb)
visible_message("\red <B>[H] attempted to [atk_verb] [src]!</B>")
visible_message("\red [pick("The [pick(attack.attack_noun)] barely missed their [affecting.display_name]!", "[src] managed to dodge the [pick(attack.attack_noun)] narrowly!")]")
attack_message = "[H] attempted to [pick(attack.attack_verb)] [src], but the [attack.attack_noun] missed!"
miss_type = 1
H.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [atk_verb] [src.name] ([src.ckey]) (dodged)</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Dodged attack by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(H)] attempted to [pick(attack.attack_verb)] [key_name(src)] (dodged)")
return 0
if(block)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[H] went for [src]'s [affecting.display_name] but was blocked!</B>")
if(!miss_type && block)
attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!"
miss_type = 2
H.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [pick(attack.attack_verb)] [src.name] ([src.ckey]) (blocked)</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Blocked attack by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(H)] attempted to [pick(attack.attack_verb)] [key_name(src)] (blocked)")
if(!attack_message)
attack.show_attack(H, src, hit_zone, damage)
else
H.visible_message("<span class='danger'>[attack_message]</span>")
playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]ed"] [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>[miss_type ? (miss_type == 1 ? "Was missed by" : "Has blocked") : "Has Been [pick(attack.attack_verb)]ed"] by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]ed"] [key_name(src)]")
if(miss_type)
return 0
// Handle the attack logs
attack.combat_log(H, src, hit_zone, damage)
if(HULK in H.mutations)
damage *= 2 // Hulks do twice the damage)
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[pick(attack.attack_verb)]ed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [pick(attack.attack_verb)]ed by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name(H)] [pick(attack.attack_verb)]ed [key_name(src)]")
// Apply possible buffs
damage = H.get_combat_buff(damage)
var/armor_block = run_armor_check(affecting, "melee") // IMPORTANT: To run armor check after attack log as it produces a log itself
var/numb = rand(0, 100)
if(damage >= 5 && armor_block < 2 && !(src == H) && numb <= damage*5) // 25% standard chance
switch(hit_zone) // strong punches can have effects depending on where they hit
if("head")
// Induce blurriness
visible_message("\red [src] stares blankly for a few moments.", "\red You see stars.")
apply_effect(damage*2, EYE_BLUR, armor_block)
if("l_arm", "l_hand")
if (l_hand)
// Disarm left hand
visible_message("\red [src] [pick("dropped", "let go off")] \the [l_hand][pick("", " with a scream")]!")
drop_l_hand()
if("r_arm", "r_hand")
if (r_hand)
// Disarm right hand
visible_message("\red [src] [pick("dropped", "let go off")] \the [r_hand][pick("", " with a scream")]!")
drop_r_hand()
if("chest")
if(!src.lying)
visible_message("\red [pick("[src] was sent flying backward a few metres!", "[src] staggers back from the impact!")]")
step(src, get_dir(get_turf(M), get_turf(src)))
apply_effect(0.4*damage, WEAKEN, armor_block)
if("groin")
visible_message("\red [src] looks like \he is in pain!", (gender=="female")?"\red <i>Oh god that hurt!</i>":"\red <i>Oh no, not your[pick("testicles", "crown jewels", "clockweights", "family jewels", "marbles", "bean bags", "teabags", "sweetmeats", "goolies")]!</i>")
apply_effects(stutter=damage*2, agony=damage*3, blocked=armor_block)
if("l_leg", "l_foot", "r_leg", "r_foot")
if(!src.lying)
visible_message("\red [src] gives way slightly.")
apply_effect(damage*3, AGONY, armor_block)
else if(damage >= 5 && !(src == H) && numb+damage*5 >= 100 && armor_block < 2) // Chance to get the usual throwdown as well (25% standard chance)
if(!src.lying)
visible_message("\red [src] [pick("slumps", "falls", "drops")] down to the ground!")
else
visible_message("\red [src] has been weakened!")
apply_effect(3, WEAKEN, armor_block)
// Sum up species damage bonus at the very end so xenos don't get buffed stun chances
damage += attack.damage // 3 for human/skrell, 5 for tajaran/unathi
playsound(H.loc, attack.attack_sound, 25, 1, -1)
var/armour = run_armor_check(affecting, "melee")
// Apply additional unarmed effects.
attack.apply_effects(H,src,armour,damage,hit_zone)
// Finally, apply damage to target
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge)
apply_damage(damage, BRUTE, affecting, armour, sharp=attack.sharp, edge=attack.edge)
if("disarm")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")

View File

@@ -59,7 +59,7 @@
var/used_skillpoints = 0
var/skill_specialization = null
var/list/skills = null
var/list/skills = list()
var/icon/stand_icon = null
var/icon/lying_icon = null
@@ -82,5 +82,3 @@
var/hand_blood_color
var/list/flavor_texts = list()
var/attack_move = 0 //Used in combat to check if user is performing an attack over several ticks

View File

@@ -1245,7 +1245,7 @@
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
client.images.Remove(hud)
client.screen.Remove(global_huds)
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg, global_hud.thermal, global_hud.meson)
update_action_buttons()
@@ -1484,20 +1484,23 @@
if(eye_blurry) client.screen += global_hud.blurry
if(druggy) client.screen += global_hud.druggy
var/masked = 0
if(!masked && istype(glasses, /obj/item/clothing/glasses/welding))
var/obj/item/clothing/glasses/welding/O = glasses
if(!O.up && tinted_weldhelh)
if(tinted_weldhelh)
var/found_welder
if(istype(glasses, /obj/item/clothing/glasses/welding))
var/obj/item/clothing/glasses/welding/O = glasses
if(!O.up)
found_welder = 1
else if(istype(head, /obj/item/clothing/head/welding))
var/obj/item/clothing/head/welding/O = head
if(!O.up)
found_welder = 1
else if(istype(back, /obj/item/weapon/rig))
var/obj/item/weapon/rig/O = back
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
found_welder = 1
if(found_welder)
client.screen |= global_hud.darkMask
masked = 1
if(!masked && istype(back, /obj/item/weapon/rig))
var/obj/item/weapon/rig/O = back
// Ugh, why is this done on a case by case basis? Why is there no flag for causing weldervision?
if(O.helmet && O.helmet == head && (O.helmet.body_parts_covered & EYES))
if((O.offline && O.offline_vision_restriction == 1) || (!O.offline && O.vision_restriction == 1))
client.screen |= global_hud.darkMask
if(machine)
if(!machine.check_eye(src))

View File

@@ -222,7 +222,7 @@
language = "Sinta'unathi"
tail = "sogtail"
unarmed_type = /datum/unarmed_attack/claws
secondary_unarmed_type = /datum/unarmed_attack/bite/strong
secondary_unarmed_type = /datum/unarmed_attack/bite/sharp
primitive = /mob/living/carbon/monkey/unathi
darksight = 3
gluttonous = 1
@@ -250,7 +250,7 @@
language = "Siik'tajr"
tail = "tajtail"
unarmed_type = /datum/unarmed_attack/claws
secondary_unarmed_type = /datum/unarmed_attack/bite/eye_tooth
secondary_unarmed_type = /datum/unarmed_attack/bite/sharp
darksight = 8
cold_level_1 = 200 //Default 260
@@ -493,154 +493,6 @@
return 0
//Species unarmed attacks
/datum/unarmed_attack
var/attack_verb = list("attack") // Empty hand hurt intent verb.
var/attack_noun = list("fist")
var/damage = 0 // Extra empty hand attack damage.
var/attack_sound = "punch"
var/miss_sound = 'sound/weapons/punchmiss.ogg'
var/shredding = 0 // Calls the old attack_alien() behavior on objects/mobs when on harm intent.
var/sharp = 0
var/edge = 0
/datum/unarmed_attack/proc/is_usable(var/mob/living/carbon/human/user)
if(user.restrained())
return 0
// Check if they have a functioning hand.
var/datum/organ/external/E = user.organs_by_name["l_hand"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
E = user.organs_by_name["r_hand"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
return 0
/datum/unarmed_attack/proc/combat_log(mob/living/carbon/human/M as mob, mob/living/carbon/human/T as mob, zone, damage)
var/datum/organ/external/affecting = T.get_organ(zone)
M.visible_message("<span class='warning'>[M] [pick(attack_verb)] [T] in the [affecting.display_name]!</span>")
playsound(M.loc, attack_sound, 25, 1, -1)
/datum/unarmed_attack/bite
attack_verb = list("bite") // 'x has biteed y', needs work.
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 3
sharp = 0
edge = 0
/datum/unarmed_attack/bite/eye_tooth
attack_verb = list("bite") // 'x has biteed y', needs work.
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 5
sharp = 1
edge = 1
/datum/unarmed_attack/bite/is_usable(var/mob/living/carbon/human/user)
if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
return 0
return 1
/datum/unarmed_attack/punch
attack_verb = list("punch")
attack_noun = list("fist")
damage = 3
/datum/unarmed_attack/punch/combat_log(mob/living/carbon/human/M as mob, mob/living/carbon/human/T as mob, zone, damage)
var/skill = M.skills["combat"]
var/datum/organ/external/affecting = T.get_organ(zone)
var/organ = affecting.display_name
if(!skill) skill = 1
damage = Clamp(damage, 1, 5)
if(T == M)
M.visible_message("\red <B>[M] [pick(attack_verb)]ed \himself in the [organ]!</B>")
return 0
if(!T.lying)
switch(zone)
if("head")
// ----- HEAD ----- //
switch(damage)
if(1 to 2) M.visible_message("\red <B>[M] slapped [T] across \his cheek!</B>")
if(3 to 4) M.visible_message("\red <B>[M] struck [T] in the head[pick("", " with a closed fist")]!</B>")
if(5) M.visible_message("\red <B>[M] gave [T] a resounding slap to the face!</B>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand")
// -- UPPER BODY -- //
switch(damage)
if(1 to 2) M.visible_message("\red <B>[M] slapped [T]'s [organ]!</B>")
if(3 to 4) M.visible_message("\red <B>[M] [findtext(zone, "hand")?"[pick(attack_verb)]ed":pick("[pick(attack_verb)]ed", "shoulders")] [T] in \his [organ]!</B>")
if(5) M.visible_message("\red <B>[M] rammed \his [pick(attack_noun)] into [T]'s [organ]!</B>")
if("groin", "l_leg", "r_leg")
// -- LOWER BODY -- //
switch(damage)
if(1 to 2) M.visible_message("\red <B>[M] gave [T] a light kick to the [organ]!</B>")
if(3 to 4) M.visible_message("\red <B>[M] [pick("kicked", "kneed")] [T] in \his [organ]!</B>")
if(5) M.visible_message("\red <B>[M] landed a strong kick against [T]'s [organ]!</B>")
if("l_foot", "r_foot")
// ----- FEET ----- //
switch(damage)
if(1 to 4) M.visible_message("\red <B>[M] kicked [T] in \his [organ]!</B>")
if(5) M.visible_message("\red <B>[M] stomped down hard on [T]'s [organ]!")
else if (M.loc != T.loc)
M.visible_message("\red <B>[M] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "rams their foot into")] [T]'s [organ]!</B>")
else
M.visible_message("\red <B>[M] [pick("punches", "throws a punch", "strikes", "slaps", "rams their [pick(attack_noun)] into")] [T]'s [organ]!</B>")
/datum/unarmed_attack/diona
attack_verb = list("lash", "bludgeon")
attack_noun = list("tendril")
damage = 5
/datum/unarmed_attack/claws
attack_verb = list("scratch", "claw", "goug")
attack_noun = list("claws")
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
damage = 5
sharp = 1
edge = 1
/datum/unarmed_attack/claws/combat_log(mob/living/carbon/human/M as mob, mob/living/carbon/human/T as mob, zone, damage)
var/skill = M.skills["combat"]
var/datum/organ/external/affecting = T.get_organ(zone)
var/organ = affecting.display_name
if(!skill) skill = 1
damage = Clamp(damage, 1, 5)
if(T == M)
M.visible_message("\red <B>[M] [pick(attack_verb)]ed \himself in the [organ]!</B>")
return 0
switch(zone)
if("head")
// ----- HEAD ----- //
switch(damage)
if(1 to 2) M.visible_message("\red <B>[M] scratched [T] across \his cheek!</B>")
if(3 to 4) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [pick("", "the side of")][T] [pick("head", "neck")][pick("", " with spread [pick(attack_noun)]")]!</B>")
if(5) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [T] across \his face!</B>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
// ----- BODY ----- //
switch(damage)
if(1 to 2) M.visible_message("\red <B>[M] scratched [T]'s [organ]!</B>")
if(3 to 4) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [pick("", "the side of")][T]'s [organ]!</B>")
if(5) M.visible_message("\red <B>[M] digs \his [pick(attack_noun)] deep into [T]'s [organ]!</B>")
/datum/unarmed_attack/claws/strong
attack_verb = list("slash")
damage = 10
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("maul")
damage = 15
shredding = 1
/datum/hud_data
var/icon // If set, overrides ui_style.
@@ -694,4 +546,4 @@
if(slot_w_uniform in equip_slots)
equip_slots |= slot_tie
equip_slots |= slot_legcuffed
equip_slots |= slot_legcuffed

View File

@@ -0,0 +1,193 @@
//Species unarmed attacks
/datum/unarmed_attack
var/attack_verb = list("attack") // Empty hand hurt intent verb.
var/attack_noun = list("fist")
var/damage = 0 // Extra empty hand attack damage.
var/attack_sound = "punch"
var/miss_sound = 'sound/weapons/punchmiss.ogg'
var/shredding = 0 // Calls the old attack_alien() behavior on objects/mobs when on harm intent.
var/sharp = 0
var/edge = 0
/datum/unarmed_attack/proc/is_usable(var/mob/living/carbon/human/user)
if(user.restrained())
return 0
// Check if they have a functioning hand.
var/datum/organ/external/E = user.organs_by_name["l_hand"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
E = user.organs_by_name["r_hand"]
if(E && !(E.status & ORGAN_DESTROYED))
return 1
return 0
/datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
var/stun_chance = rand(0, 100)
// Reduce effective damage to normalize stun chance across species.
attack_damage = min(1,attack_damage - damage)
if(attack_damage >= 5 && armour < 2 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance
switch(zone) // strong punches can have effects depending on where they hit
if("head", "mouth", "eyes")
// Induce blurriness
target.visible_message("<span class='danger'>[target] looks dazed.</span>", "<span class='danger'>You see stars.</span>")
target.apply_effect(attack_damage*2, EYE_BLUR, armour)
if("l_arm", "l_hand")
if (target.l_hand)
// Disarm left hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.l_hand][pick("", " with a scream")]!</span>")
target.drop_l_hand()
if("r_arm", "r_hand")
if (target.r_hand)
// Disarm right hand
target.visible_message("<span class='danger'>[src] [pick("dropped", "let go off")] \the [target.r_hand][pick("", " with a scream")]!</span>")
target.drop_r_hand()
if("chest")
if(!target.lying)
target.visible_message("<span class='danger'>[pick("[target] was sent flying backward!", "[target] staggers back from the impact!")]</span>")
var/turf/T = step(src, get_dir(get_turf(user), get_turf(target)))
if(T.density) // This will need to be expanded to check for structures etc.
target.visible_message("<span class='danger'>[target] slams into [T]!</span>")
else
target.loc = T
target.apply_effect(attack_damage * 0.4, WEAKEN, armour)
if("groin")
target.visible_message("<span class='warning'>[target] looks like \he is in pain!</span>", "<span class='warning'>[(target.gender=="female") ? "Oh god that hurt!" : "Oh no, not your[pick("testicles", "crown jewels", "clockweights", "family jewels", "marbles", "bean bags", "teabags", "sweetmeats", "goolies")]!"]</span>")
target.apply_effects(stutter = attack_damage * 2, agony = attack_damage* 3, blocked = armour)
if("l_leg", "l_foot", "r_leg", "r_foot")
if(!target.lying)
target.visible_message("<span class='warning'>[src] gives way slightly.</span>")
target.apply_effect(attack_damage*3, AGONY, armour)
else if(attack_damage >= 5 && !(target == user) && (stun_chance + attack_damage) * 5 >= 100 && armour < 2) // Chance to get the usual throwdown as well (25% standard chance)
if(!target.lying)
target.visible_message("<span class='danger'>[pick("slumps", "falls", "drops")] down to the ground!</span>")
else
target.visible_message("<span class='danger'>[target] has been weakened!</span>")
target.apply_effect(3, WEAKEN, armour)
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/datum/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.display_name]!</span>")
playsound(user.loc, attack_sound, 25, 1, -1)
/datum/unarmed_attack/bite
attack_verb = list("bit")
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 0
sharp = 0
edge = 0
/datum/unarmed_attack/bite/sharp //eye teeth
attack_verb = list("bit", "chomped on")
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 5
sharp = 1
edge = 1
/datum/unarmed_attack/bite/is_usable(var/mob/living/carbon/human/user)
if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
return 0
return 1
/datum/unarmed_attack/punch
attack_verb = list("punched")
attack_noun = list("fist")
damage = 0
/datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/skill = user.skills["combat"]
var/datum/organ/external/affecting = target.get_organ(zone)
var/organ = affecting.display_name
if(!skill) skill = 1
if(target == user)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [organ]!</span>")
return 0
if(!target.lying)
switch(zone)
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] struck [target] in the head[pick("", " with a closed fist")]!</span>")
if(5) user.visible_message("<span class='danger'>[user] gave [target] a resounding slap to the face!</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand")
// -- UPPER BODY -- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target]'s [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] slams \his [pick(attack_noun)] into [target]'s [organ]!</span>")
if("groin", "l_leg", "r_leg")
// -- LOWER BODY -- //
switch(attack_damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] gave [target] a light kick to the [organ]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick("kicked", "kneed")] [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] landed a strong kick against [target]'s [organ]!</span>")
if("l_foot", "r_foot")
// ----- FEET ----- //
switch(attack_damage)
if(1 to 4) user.visible_message("<span class='danger'>[user] kicked [target] in \his [organ]!</span>")
if(5) user.visible_message("<span class='danger'>[user] stomped down hard on [target]'s [organ]!</span>")
else if (user.loc != target.loc)
user.visible_message("<span class='danger'>[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slams their foot into")] [target]'s [organ]!</span>")
else
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>")
/datum/unarmed_attack/diona
attack_verb = list("lashed", "bludgeoned")
attack_noun = list("tendril")
damage = 5
/datum/unarmed_attack/claws
attack_verb = list("scratched", "clawed", "slashed")
attack_noun = list("claws")
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
damage = 5
sharp = 1
edge = 1
/datum/unarmed_attack/claws/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/skill = user.skills["combat"]
var/datum/organ/external/affecting = target.get_organ(zone)
if(!skill) skill = 1
attack_damage = Clamp(attack_damage, 1, 5)
if(target == user)
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.display_name]!</span>")
return 0
switch(zone)
if("head", "mouth", "eyes")
// ----- HEAD ----- //
switch(damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!</span>")
if(5) user.visible_message("<span class='danger'>[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]</span>")
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
// ----- BODY ----- //
switch(damage)
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!</span>")
/datum/unarmed_attack/claws/strong
attack_verb = list("slash")
damage = 10
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("maul")
damage = 15
shredding = 1

View File

@@ -31,24 +31,24 @@ proc/mutation_table(var/colour)
//Tier 3
if("dark blue")
slime_mutation[1] = "purple"
slime_mutation[2] = "blue"
slime_mutation[3] = "cerulean"
slime_mutation[4] = "cerulean"
slime_mutation[2] = "purple"
slime_mutation[3] = "blue"
slime_mutation[4] = "blue"
if("dark purple")
slime_mutation[1] = "purple"
slime_mutation[2] = "orange"
slime_mutation[3] = "sepia"
slime_mutation[4] = "sepia"
slime_mutation[2] = "purple"
slime_mutation[3] = "orange"
slime_mutation[4] = "orange"
if("yellow")
slime_mutation[1] = "metal"
slime_mutation[2] = "orange"
slime_mutation[3] = "bluespace"
slime_mutation[4] = "bluespace"
slime_mutation[2] = "metal"
slime_mutation[3] = "orange"
slime_mutation[4] = "orange"
if("silver")
slime_mutation[1] = "metal"
slime_mutation[2] = "blue"
slime_mutation[3] = "pyrite"
slime_mutation[4] = "pyrite"
slime_mutation[2] = "metal"
slime_mutation[3] = "blue"
slime_mutation[4] = "blue"
//Tier 4
if("pink")
slime_mutation[1] = "pink"

View File

@@ -53,7 +53,7 @@ mob/living/carbon/monkey/proc/npc_act()
hiding_behind = null
hid_behind = 0
if(loc == prevloc) dir = get_dir(src, npc_fleeing)
if(loc == prevloc) set_dir(get_dir(src, npc_fleeing))
else
if(prob(33) && canmove && isturf(loc))
step(src, pick(cardinal))

View File

@@ -45,6 +45,7 @@ var/list/ai_verbs_default = list(
anchored = 1 // -- TLE
density = 1
status_flags = CANSTUN|CANPARALYSE
shouldnt_see = list(/obj/effect/rune)
var/list/network = list("SS13")
var/obj/machinery/camera/camera = null
var/list/connected_robots = list()
@@ -71,6 +72,7 @@ var/list/ai_verbs_default = list(
var/mob/living/silicon/ai/parent = null
var/apc_override = 0 //hack for letting the AI use its APC even when visionless
var/camera_light_on = 0 //Defines if the AI toggled the light on the camera it's looking through.
var/datum/trackable/track = null
var/last_announcement = ""
@@ -129,7 +131,7 @@ var/list/ai_verbs_default = list(
//Languages
add_language("Robot Talk", 1)
add_language("Galactic Common", 0)
add_language("Galactic Common", 1)
add_language("Sol Common", 0)
add_language("Sinta'unathi", 0)
add_language("Siik'tajr", 0)
@@ -228,7 +230,7 @@ var/list/ai_verbs_default = list(
*/
/obj/machinery/ai_powersupply
name="Power Supply"
active_power_usage=1000
active_power_usage=50000 // Station AIs use significant amounts of power. This, when combined with charged SMES should mean AI lasts for 1hr without external power.
use_power = 2
power_channel = EQUIP
var/mob/living/silicon/ai/powered_ai = null

View File

@@ -166,7 +166,9 @@
src << "Receiving control information from APC."
sleep(2)
//bring up APC dialog
apc_override = 1
theAPC.attack_ai(src)
apc_override = 0
src:aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws()

View File

@@ -339,6 +339,7 @@
chassis = possible_chassis[choice]
verbs -= /mob/living/silicon/pai/proc/choose_chassis
verbs += /mob/living/proc/hide
/mob/living/silicon/pai/proc/choose_verbs()
set category = "pAI Commands"

View File

@@ -26,8 +26,14 @@
/obj/item/weapon/smes_coil
)
//Item currently being held.
var/obj/item/wrapped = null
var/obj/item/wrapped = null // Item currently being held.
// VEEEEERY limited version for mining borgs. Basically only for swapping cells and upgrading the drills.
/obj/item/weapon/gripper/miner
can_hold = list(
/obj/item/weapon/cell,
/obj/item/weapon/stock_parts
)
/obj/item/weapon/gripper/paperwork
name = "paperwork gripper"
@@ -44,7 +50,8 @@
/obj/item/weapon/gripper/attack_self(mob/user as mob)
if(wrapped)
wrapped.attack_self(user)
return wrapped.attack_self(user)
return ..()
/obj/item/weapon/gripper/verb/drop_item()
@@ -68,12 +75,9 @@
//update_icon()
/obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
return (wrapped ? wrapped.attack(M,user) : 0)
/obj/item/weapon/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, proximity, params)
if(!target || !proximity) //Target is invalid or we are not adjacent.
return
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
if(!wrapped)
@@ -82,13 +86,10 @@
break
if(wrapped) //Already have an item.
//Temporary put wrapped into user so target's attackby() checks pass.
wrapped.loc = user
//Pass the attack on to the target. This might delete/relocate wrapped.
target.attackby(wrapped,user)
wrapped.afterattack(target,user)
//If wrapped was neither deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))
wrapped.loc = src
@@ -255,6 +256,8 @@
stored_comms["wood"]++
stored_comms["wood"]++
stored_comms["wood"]++
else if(istype(W,/obj/item/pipe))
// This allows drones and engiborgs to clear pipe assemblies from floors.
else
continue

View File

@@ -78,25 +78,22 @@ var/list/robot_verbs_default = list(
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/braintype = "Cyborg"
/mob/living/silicon/robot/drain_power(var/drain_check)
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
if(drain_check)
return 1
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
if(!cell || !cell.charge)
return 0
..()
if(cell.charge)
src << "<span class='danger'>Warning: Unauthorized access through power channel 12 detected.</span>"
var/drained_power = rand(200,400)
if(cell.charge < drained_power)
drained_power = cell.charge
cell.use(drained_power)
return drained_power
return 0
/mob/living/silicon/robot/New(loc,var/syndie = 0,var/unfinished = 0)
/mob/living/silicon/robot/New(loc,var/unfinished = 0)
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -112,23 +109,11 @@ var/list/robot_verbs_default = list(
updatename("Default")
updateicon()
if(syndie)
if(!cell)
cell = new /obj/item/weapon/cell(src)
laws = new /datum/ai_laws/antimov()
lawupdate = 0
scrambledcodes = 1
cell.maxcharge = 25000
cell.charge = 25000
module = new /obj/item/weapon/robot_module/syndicate(src)
hands.icon_state = "standard"
icon_state = "secborg"
modtype = "Security"
init()
radio = new /obj/item/device/radio/borg(src)
common_radio = radio
init()
if(!scrambledcodes && !camera)
camera = new /obj/machinery/camera(src)
camera.c_tag = real_name
@@ -182,6 +167,36 @@ var/list/robot_verbs_default = list(
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
module = new /obj/item/weapon/robot_module/syndicate(src)
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/drain_power(var/drain_check)
if(drain_check)
return 1
if(!cell || !cell.charge)
return 0
if(cell.charge)
src << "<span class='danger'>Warning: Unauthorized access through power channel 12 detected.</span>"
var/drained_power = rand(200,400)
if(cell.charge < drained_power)
drained_power = cell.charge
cell.use(drained_power)
return drained_power
return 0
// setup the PDA and its name
/mob/living/silicon/robot/proc/setup_PDA()
if (!rbPDA)
@@ -249,7 +264,7 @@ var/list/robot_verbs_default = list(
module_sprites["Basic"] = "Miner_old"
module_sprites["Advanced Droid"] = "droid-miner"
module_sprites["Treadhead"] = "Miner"
module_sprites["Drone"] = "drone-medical"
module_sprites["Drone"] = "drone-miner"
if("Crisis")
module = new /obj/item/weapon/robot_module/crisis(src)
@@ -260,6 +275,7 @@ var/list/robot_verbs_default = list(
module_sprites["Standard"] = "surgeon"
module_sprites["Advanced Droid"] = "droid-medical"
module_sprites["Needles"] = "medicalrobot"
module_sprites["Drone" ] = "drone-medical"
if("Surgeon")
module = new /obj/item/weapon/robot_module/surgeon(src)
@@ -271,7 +287,7 @@ var/list/robot_verbs_default = list(
module_sprites["Standard"] = "surgeon"
module_sprites["Advanced Droid"] = "droid-medical"
module_sprites["Needles"] = "medicalrobot"
module_sprites["Drone"] = "drone-medical"
module_sprites["Drone"] = "drone-surgery"
if("Security")
module = new /obj/item/weapon/robot_module/security(src)
@@ -339,13 +355,14 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(prefix)
modtype = prefix
if(mmi)
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
else
braintype = "Cyborg"
else
if(istype(mmi, /obj/item/device/mmi/digital/posibrain))
braintype = "Android"
else if(istype(mmi, /obj/item/device/mmi/digital/robot))
braintype = "Robot"
else
braintype = "Cyborg"
var/changed_name = ""
if(custom_name)
@@ -1291,6 +1308,16 @@ var/list/robot_verbs_default = list(
return 1
return 0
/mob/living/silicon/robot/syndicate/canUseTopic(atom/movable/M)
if(stat || lockcharge || stunned || weakened)
return
if(z in config.admin_levels)
return 1
if(istype(M, /obj/machinery))
var/obj/machinery/Machine = M
return Machine.emagged
return 1
/mob/living/silicon/robot/proc/notify_ai(var/notifytype, var/oldname, var/newname)
if(!connected_ai)
return
@@ -1300,4 +1327,4 @@ var/list/robot_verbs_default = list(
if(2) //New Module
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [module.name] module.</span><br>"
if(3) //New Name
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"

View File

@@ -181,6 +181,7 @@
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/device/pipe_painter(src)
/obj/item/weapon/robot_module/engineering
name = "engineering robot module"
@@ -189,7 +190,7 @@
/obj/item/stack/sheet/metal = 50,
/obj/item/stack/sheet/glass = 50,
/obj/item/stack/sheet/glass/reinforced = 50,
/obj/item/stack/cable_coil = 50,
/obj/item/stack/cable_coil/robot = 50,
/obj/item/stack/rods = 15,
/obj/item/stack/tile/plasteel = 15
)
@@ -210,6 +211,7 @@
src.modules += new /obj/item/taperoll/engineering(src)
src.modules += new /obj/item/weapon/gripper(src)
src.modules += new /obj/item/weapon/matter_decompiler(src)
src.modules += new /obj/item/device/pipe_painter(src)
src.emag = new /obj/item/borg/stun(src)
@@ -225,7 +227,7 @@
G.amount = 50
src.modules += G
var/obj/item/stack/cable_coil/W = new /obj/item/stack/cable_coil(src)
var/obj/item/stack/cable_coil/robot/W = new /obj/item/stack/cable_coil/robot(src)
W.amount = 50
src.modules += W
@@ -365,20 +367,39 @@
src.modules += new /obj/item/weapon/storage/bag/ore(src)
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
src.modules += new /obj/item/weapon/gripper/miner(src)
src.modules += new /obj/item/weapon/mining_scanner(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
return
/obj/item/weapon/robot_module/syndicate
name = "illegal robot module"
New()
New(var/mob/living/silicon/robot/R)
loc = R
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/energy/sword(src)
src.modules += new /obj/item/weapon/gun/energy/pulse_rifle/destroyer(src)
src.modules += new /obj/item/weapon/card/emag(src)
var/jetpack = new/obj/item/weapon/tank/jetpack/carbondioxide(src)
src.modules += jetpack
R.internals = jetpack
return
/obj/item/weapon/robot_module/syndicate/add_languages(var/mob/living/silicon/robot/R)
//full set of languages
R.add_language("Sol Common", 1)
R.add_language("Tradeband", 1)
R.add_language("Sinta'unathi", 0)
R.add_language("Siik'tajr", 0)
R.add_language("Skrellian", 0)
R.add_language("Gutter", 1)
/obj/item/weapon/robot_module/combat
name = "combat robot module"
@@ -406,7 +427,7 @@
/obj/item/stack/tile/plasteel = 15,
/obj/item/stack/sheet/metal = 20,
/obj/item/stack/sheet/glass = 20,
/obj/item/stack/cable_coil = 30
/obj/item/stack/cable_coil/robot = 30
)
New()

View File

@@ -297,15 +297,15 @@
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
if (movement_target.loc.x < src.x)
dir = WEST
set_dir(WEST)
else if (movement_target.loc.x > src.x)
dir = EAST
set_dir(EAST)
else if (movement_target.loc.y < src.y)
dir = SOUTH
set_dir(SOUTH)
else if (movement_target.loc.y > src.y)
dir = NORTH
set_dir(NORTH)
else
dir = SOUTH
set_dir(SOUTH)
if(isturf(movement_target.loc) )
UnarmedAttack(movement_target)
@@ -316,7 +316,7 @@
visible_emote(pick("dances around","chases their tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
set_dir(i)
sleep(1)
/obj/item/weapon/reagent_containers/food/snacks/meat/corgi
@@ -369,7 +369,7 @@
M.show_message("\blue [user] baps [name] on the nose with the rolled up [O]")
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2))
dir = i
set_dir(i)
sleep(1)
else
..()
@@ -471,5 +471,5 @@
visible_emote(pick("dances around","chases her tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
set_dir(i)
sleep(1)

View File

@@ -43,7 +43,7 @@
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/mmi/posibrain))
if(istype(O, /obj/item/device/mmi))
var/obj/item/device/mmi/B = O
if(src.mmi) //There's already a brain in it.
user << "\red There's already a brain in [src]!"
@@ -164,14 +164,12 @@
death()
/mob/living/simple_animal/spiderbot/proc/update_icon()
if(mmi)
if(istype(mmi,/obj/item/device/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
if(istype(mmi, /obj/item/device/mmi/posibrain))
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
if(istype(mmi, /obj/item/device/mmi/digital/posibrain))
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
else if(istype(mmi,/obj/item/device/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
else
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"

View File

@@ -74,7 +74,7 @@
stance_step = max(0, stance_step) //If we have not seen a mob in a while, the stance_step will be negative, we need to reset it to 0 as soon as we see a mob again.
stance_step++
found_mob = 1
src.dir = get_dir(src,target_mob) //Keep staring at the mob
src.set_dir(get_dir(src,target_mob)) //Keep staring at the mob
if(stance_step in list(1,4,7)) //every 3 ticks
var/action = pick( list( "growls at [target_mob]", "stares angrily at [target_mob]", "prepares to attack [target_mob]", "closely watches [target_mob]" ) )

View File

@@ -75,7 +75,7 @@
if(stat == CONSCIOUS || stat == UNCONSCIOUS)
icon_state = "spacewormhead[previous?1:0]"
if(previous)
dir = get_dir(previous,src)
set_dir(get_dir(previous,src))
else
icon_state = "spacewormheaddead"
@@ -129,7 +129,7 @@
icon_state = "spaceworm[get_dir(src,previous) | get_dir(src,next)]" //see 3 lines below
else //tail
icon_state = "spacewormtail"
dir = get_dir(src,next) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
set_dir(get_dir(src,next)) //next will always be present since it's not a head and if it's dead, it goes in the other if branch
else
icon_state = "spacewormdead"

View File

@@ -652,9 +652,6 @@ var/list/slot_equipment_priority = list( \
var/mob/pulled = AM
pulled.inertia_dir = 0
/mob/proc/get_combat_buff(var/damage)
return damage
/mob/proc/can_use_hands()
return
@@ -823,6 +820,8 @@ note dizziness decrements automatically in the mob's Life() proc.
for(var/atom/A in listed_turf)
if(A.invisibility > see_invisible)
continue
if(is_type_in_list(A, shouldnt_see))
continue
statpanel(listed_turf.name, null, A)
if(spell_list && spell_list.len)
@@ -906,10 +905,9 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/facedir(var/ndir)
if(!canface()) return 0
dir = ndir
set_dir(ndir)
if(buckled && buckled.movable)
buckled.dir = ndir
buckled.handle_rotation()
buckled.set_dir(ndir)
client.move_delay += movement_delay()
return 1

View File

@@ -217,6 +217,7 @@
var/immune_to_ssd = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
var/list/active_genes=list()

View File

@@ -471,9 +471,10 @@ proc/is_blind(A)
//I know you can't see the change, but I rewrote the name code. It is significantly less messy now
/proc/say_dead_direct(var/message, var/mob/subject = null)
var/name
var/keyname
if(subject && subject.client)
var/client/C = subject.client
var/keyname = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
keyname = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
if(C.mob) //Most of the time this is the dead/observer mob; we can totally use him if there is no better name
var/mindname
var/realname = C.mob.real_name
@@ -485,17 +486,30 @@ proc/is_blind(A)
name = "[realname] died as [mindname]"
else
name = realname
name = "<span class='name'>[keyname] ([name])</span> "
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !is_mentor(M.client))) && (M.client.prefs.toggles & CHAT_DEAD))
var/follow = ""
var/follow
var/lname
if(subject)
if(subject != M)
follow = "(<a href='byond://?src=\ref[M];track=\ref[subject]'>follow</a>) "
if(M.stat != DEAD && M.client.holder)
follow = "(<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[subject]'>JMP</a>) "
M << "<span class='deadsay'>" + create_text_tag("dead", "DEAD:", M.client) + " [name][follow][message]</span>"
var/mob/dead/observer/DM
if(istype(subject, /mob/dead/observer))
DM = subject
if(M.client.holder) // What admins see
lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])"
else
if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous
lname = "Ghost of [name]"
else if(DM) // Non-anons
lname = "[keyname] ([name])"
else // Everyone else (dead people who didn't ghost yet, etc.)
lname = name
lname = "<span class='name'>[lname]</span> "
M << "<span class='deadsay'>" + create_text_tag("dead", "DEAD:", M.client) + " [lname][follow][message]</span>"
//Announces that a ghost has joined/left, mainly for use with wizards
/proc/announce_ghost_joinleave(O, var/joined_ghosts = 1, var/message = "")

View File

@@ -110,8 +110,8 @@
*/
return
/atom/movable/Move(NewLoc, direct)
//This proc should never be overridden elsewhere at /atom/movable to keep directions sane.
/atom/movable/Move(newloc, direct)
if (direct & (direct - 1))
if (direct & 1)
if (direct & 4)
@@ -143,9 +143,20 @@
if (step(src, WEST))
step(src, SOUTH)
else
. = ..()
return
var/atom/A = src.loc
var/olddir = dir //we can't override this without sacrificing the rest of movable/New()
. = ..()
if(direct != olddir)
dir = olddir
set_dir(direct)
src.move_speed = world.time - src.l_move_time
src.l_move_time = world.time
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
return
/client/proc/Move_object(direct)
if(mob && mob.control_object)

View File

@@ -334,7 +334,7 @@
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
character.buckled.loc = character.loc
character.buckled.dir = character.dir
character.buckled.set_dir(character.dir)
ticker.mode.latespawn(character)
@@ -375,7 +375,10 @@
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
var/name = client.prefs.be_random_name ? "friend" : client.prefs.real_name
var/dat = "<html><body><center>"
dat += "<b>Welcome, [name].<br></b>"
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.

View File

@@ -158,14 +158,13 @@
O.job = "Cyborg"
if(O.mind.assigned_role == "Cyborg")
if(O.mind.role_alt_title == "Android")
O.mmi = new /obj/item/device/mmi/posibrain(O)
O.mmi = new /obj/item/device/mmi/digital/posibrain(O)
else if(O.mind.role_alt_title == "Robot")
O.mmi = null //Robots do not have removable brains.
O.mmi = new /obj/item/device/mmi/digital/robot(O)
else
O.mmi = new /obj/item/device/mmi(O)
if(O.mmi)
O.mmi.transfer_identity(src)
O.mmi.transfer_identity(src)
callHook("borgify", list(O))
O.notify_ai(1)

View File

@@ -1037,7 +1037,7 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
base.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
icon = base
dir = SOUTH
set_dir(SOUTH)
src.transform = turn(src.transform, rand(70,130))
@@ -1168,7 +1168,7 @@ obj/item/weapon/organ/head/attackby(obj/item/weapon/W as obj, mob/user as mob)
//TODO: ORGAN REMOVAL UPDATE.
if(istype(src,/obj/item/weapon/organ/head/posi))
var/obj/item/device/mmi/posibrain/B = new(loc)
var/obj/item/device/mmi/digital/posibrain/B = new(loc)
B.transfer_identity(brainmob)
else
var/obj/item/organ/brain/B = new(loc)

View File

@@ -365,6 +365,11 @@
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
if(istype(P, /obj/item/weapon/tape_roll))
var/obj/item/weapon/tape_roll/tape = P
tape.stick(src, user)
return
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/photo))
if (istype(P, /obj/item/weapon/paper/carbon))
var/obj/item/weapon/paper/carbon/C = P

View File

@@ -143,9 +143,9 @@
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
dir = ndir
set_dir(ndir)
src.tdir = dir // to fix Vars bug
dir = SOUTH
set_dir(SOUTH)
pixel_x = (src.tdir & 3)? 0 : (src.tdir == 4 ? 24 : -24)
pixel_y = (src.tdir & 3)? (src.tdir ==1 ? 24 : -24) : 0
@@ -184,7 +184,7 @@
// create a terminal object at the same position as original turf loc
// wires will attach to this
terminal = new/obj/machinery/power/terminal(src.loc)
terminal.dir = tdir
terminal.set_dir(tdir)
terminal.master = src
/obj/machinery/power/apc/proc/init()
@@ -1139,7 +1139,7 @@
else if(longtermpower > -10)
longtermpower -= 2
if(cell.charge >= 1250 || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
if((cell.percent() > 30) || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
if(autoflag != 3)
equipment = autoset(equipment, 1)
lighting = autoset(lighting, 1)
@@ -1148,21 +1148,21 @@
area.poweralert(1, src)
if(cell.charge >= 4000)
area.poweralert(1, src)
else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment
if(autoflag != 2)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 2
else if(cell.charge < 750 && cell.charge > 10) // <15%, turn off lighting & equipment
else if(cell.percent() <= 15) // <15%, turn off lighting & equipment
if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0))
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 1
else if(cell.charge <= 0) // zero charge, turn all off
else // zero charge, turn all off
if(autoflag != 0)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)

View File

@@ -590,6 +590,31 @@ obj/structure/cable/proc/cableColor(var/colorC)
usr << "\blue You cannot do that."
..()
/obj/item/stack/cable_coil/robot/verb/set_colour()
set name = "Change Colour"
set category = "Object"
var/list/possible_colours = list ("Yellow", "Green", "Pink", "Blue", "Orange", "Cyan", "Red")
var/selected_type = input("Pick new colour.", "Cable Colour", null, null) as null|anything in possible_colours
if(selected_type)
switch(selected_type)
if("Yellow")
color = COLOR_YELLOW
if("Green")
color = COLOR_GREEN
if("Pink")
color = COLOR_PINK
if("Blue")
color = COLOR_BLUE
if("Orange")
color = COLOR_ORANGE
if("Cyan")
color = COLOR_CYAN
else
color = COLOR_RED
usr << "You change your cable coil's colour to [selected_type]"
// Items usable on a cable coil :
// - Wirecutters : cut them duh !
// - Cable coil : merge cables

View File

@@ -5,18 +5,20 @@
/obj/machinery/power/fractal_reactor
name = "Fractal Energy Reactor"
desc = "This thing drains power from fractal-subspace. (DEBUG ITEM: INFINITE POWERSOURCE FOR MAP TESTING. CONTACT DEVELOPERS IF FOUND.)"
desc = "This thing drains power from fractal-subspace." // (DEBUG ITEM: INFINITE POWERSOURCE FOR MAP TESTING. CONTACT DEVELOPERS IF FOUND.)"
icon = 'icons/obj/power.dmi'
icon_state = "tracker" //ICON stolen from solar tracker. There is no need to make new texture for debug item
anchored = 1
density = 1
var/power_generation_rate = 2000000 //Defaults to 2MW of power. Should be enough to run SMES charging on full 2 times.
var/power_generation_rate = 1000000 //Defaults to 1MW of power.
var/powernet_connection_failed = 0
var/mapped_in = 0 //Do not announce creation when it's mapped in.
// This should be only used on Dev for testing purposes.
/obj/machinery/power/fractal_reactor/New()
..()
world << "<b>\red WARNING: \black Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
if(!mapped_in)
world << "<b>\red WARNING: \black Map testing power source activated at: X:[src.loc.x] Y:[src.loc.y] Z:[src.loc.z]</b>"
/obj/machinery/power/fractal_reactor/process()
if(!powernet && !powernet_connection_failed)

View File

@@ -191,7 +191,7 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
/obj/machinery/power/generator/verb/rotate_anticlock()
set category = "Object"
@@ -201,4 +201,4 @@
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
src.set_dir(turn(src.dir, -90))

View File

@@ -33,7 +33,7 @@
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/power/emitter/initialize()
@@ -137,7 +137,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
A.dir = src.dir
A.set_dir(src.dir)
switch(dir)
if(NORTH)
A.yo = 20

View File

@@ -299,7 +299,7 @@ field_generator power level display
fields += CF
G.fields += CF
CF.loc = T
CF.dir = field_dir
CF.set_dir(field_dir)
var/listcheck = 0
for(var/obj/machinery/field_generator/FG in connected_gens)
if (isnull(FG))

View File

@@ -29,7 +29,7 @@
/obj/effect/accelerated_particle/New(loc, dir = 2)
src.loc = loc
src.dir = dir
src.set_dir(dir)
if(movement_range > 20)
movement_range = 20
spawn(0)

View File

@@ -91,7 +91,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
src.set_dir(turn(src.dir, 270))
return 1
/obj/structure/particle_accelerator/verb/rotateccw()
@@ -102,7 +102,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
return 1
/obj/structure/particle_accelerator/examine(mob/user)
@@ -282,7 +282,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
src.set_dir(turn(src.dir, 270))
return 1
/obj/machinery/particle_accelerator/verb/rotateccw()
@@ -293,7 +293,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 90)
src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/particle_accelerator/update_icon()

View File

@@ -157,7 +157,7 @@
/obj/machinery/particle_accelerator/control_box/proc/part_scan()
for(var/obj/structure/particle_accelerator/fuel_chamber/F in orange(1,src))
src.dir = F.dir
src.set_dir(F.dir)
connected_parts = list()
var/tally = 0
var/ldir = turn(dir,-90)

View File

@@ -44,6 +44,6 @@
if(2)
A = new/obj/effect/accelerated_particle/strong(T, dir)
if(A)
A.dir = src.dir
A.set_dir(src.dir)
return 1
return 0

View File

@@ -36,6 +36,7 @@
var/name_tag = null
var/building_terminal = 0 //Suggestions about how to avoid clickspam building several terminals accepted!
var/obj/machinery/power/terminal/terminal = null
var/should_be_mapped = 0 // If this is set to 0 it will send out warning on New()
/obj/machinery/power/smes/drain_power(var/drain_check)
@@ -74,6 +75,13 @@
if(!terminal.powernet)
terminal.connect_to_network()
update_icon()
if(!should_be_mapped)
warning("Non-buildable or Non-magical SMES at [src.x]X [src.y]Y [src.z]Z")
return
/obj/machinery/power/smes/update_icon()
@@ -199,7 +207,7 @@
user << "<span class='notice'>You start adding cable to the [src].</span>"
if(do_after(user, 50))
terminal = new /obj/machinery/power/terminal(tempLoc)
terminal.dir = tempDir
terminal.set_dir(tempDir)
terminal.master = src
return 0
return 1
@@ -413,6 +421,7 @@
desc = "A high-capacity superconducting magnetic energy storage (SMES) unit. Magically produces power."
capacity = 9000000
output_level = 250000
should_be_mapped = 1
/obj/machinery/power/smes/magical/process()
charge = 5000000

View File

@@ -31,6 +31,8 @@
var/cur_coils = 1 // Current amount of installed coils
var/safeties_enabled = 1 // If 0 modifications can be done without discharging the SMES, at risk of critical failure.
var/failing = 0 // If 1 critical failure has occured and SMES explosion is imminent.
charge = 0
should_be_mapped = 1
/obj/machinery/power/smes/buildable/New()
component_parts = list()
@@ -86,6 +88,8 @@
var/obj/item/clothing/gloves/G = h_user.gloves
if(G.siemens_coefficient == 0)
user_protected = 1
log_game("SMES FAILURE: <b>[src.x]X [src.y]Y [src.z]Z</b> User: [usr.ckey], Intensity: [intensity]/100")
message_admins("SMES FAILURE: <b>[src.x]X [src.y]Y [src.z]Z</b> User: [usr.ckey], Intensity: [intensity]/100 - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>")
switch (intensity)
@@ -134,7 +138,7 @@
empulse(src.loc, 8, 16)
charge = 0
apcs_overload(1, 10)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"Caution. Output regulators malfunction. Uncontrolled discharge detected.\"")
src.ping("Caution. Output regulators malfunction. Uncontrolled discharge detected.")
if (61 to INFINITY)
// Massive overcharge
@@ -149,14 +153,21 @@
empulse(src.loc, 32, 64)
charge = 0
apcs_overload(5, 25)
src.visible_message("\icon[src] <b>[src]</b> beeps: \"Caution. Output regulators malfunction. Significant uncontrolled discharge detected.\"")
src.ping("Caution. Output regulators malfunction. Significant uncontrolled discharge detected.")
if (prob(50))
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DANGER! Magnetic containment field unstable! Containment field failure imminent!\"")
// Added admin-notifications so they can stop it when griffed.
log_game("SMES explosion imminent.")
message_admins("SMES explosion imminent.")
src.ping("DANGER! Magnetic containment field unstable! Containment field failure imminent!")
failing = 1
// 30 - 60 seconds and then BAM!
spawn(rand(300,600))
src.visible_message("\icon[src] <b>[src]</b> beeps: \"DANGER! Magnetic containment field failure in 3 ... 2 ... 1 ...\"")
if(!failing) // Admin can manually set this var back to 0 to stop overload, for use when griffed.
update_icon()
src.ping("Magnetic containment stabilised.")
return
src.ping("DANGER! Magnetic containment field failure in 3 ... 2 ... 1 ...")
explosion(src.loc,1,2,4,8)
// Not sure if this is necessary, but just in case the SMES *somehow* survived..
del(src)
@@ -173,7 +184,7 @@
var/obj/machinery/power/apc/A = T.master
if (prob(overload_chance))
A.overload_lighting()
else if (prob(failure_chance))
if (prob(failure_chance))
A.set_broken()
// Failing SMES has special icon overlay.

View File

@@ -102,7 +102,7 @@ var/list/solars_list = list()
overlays += image('icons/obj/power.dmi', icon_state = "solar_panel-b", layer = FLY_LAYER)
else
overlays += image('icons/obj/power.dmi', icon_state = "solar_panel", layer = FLY_LAYER)
src.dir = angle2dir(adir)
src.set_dir(angle2dir(adir))
return
//calculates the fraction of the sunlight that the panel recieves

View File

@@ -52,7 +52,7 @@
sun_angle = angle
//set icon dir to show sun illumination
dir = turn(NORTH, -angle - 22.5) // 22.5 deg bias ensures, e.g. 67.5-112.5 is EAST
set_dir(turn(NORTH, -angle - 22.5)) // 22.5 deg bias ensures, e.g. 67.5-112.5 is EAST
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
control.cdir = angle

View File

@@ -18,7 +18,7 @@
BB = new projectile_type(src)
pixel_x = rand(-10.0, 10)
pixel_y = rand(-10.0, 10)
dir = pick(cardinal)
set_dir(pick(cardinal))
/obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob)

View File

@@ -80,13 +80,17 @@ obj/item/weapon/gun/energy/laser/retro
/obj/item/weapon/gun/energy/lasercannon/mounted/load_into_chamber()
if(in_chamber)
return 1
var/mob/living/carbon/human/H = loc
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
in_chamber = new /obj/item/projectile/beam/heavylaser(src)
return 1
var/obj/item/rig_module/module = loc
if(!istype(module))
return 0
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
in_chamber = new /obj/item/projectile/beam/heavylaser(src)
return 1
return 0
/obj/item/weapon/gun/energy/lasercannon/cyborg/load_into_chamber()

View File

@@ -38,14 +38,18 @@
/obj/item/weapon/gun/energy/gun/mounted/load_into_chamber()
if(in_chamber)
return 1
var/mob/living/carbon/human/H = loc
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
var/prog_path = text2path(projectile_type)
in_chamber = new prog_path(src)
return 1
var/obj/item/rig_module/module = loc
if(!istype(module))
return 0
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit) && suit.cell && suit.cell.charge >= 250)
suit.cell.use(250)
var/prog_path = text2path(projectile_type)
in_chamber = new prog_path(src)
return 1
return 0
/obj/item/weapon/gun/energy/gun/nuclear

View File

@@ -48,7 +48,7 @@
//Lets not spam it.
if(lock_time > world.time - 2) return
user.dir = get_cardinal_dir(src, A)
user.set_dir(get_cardinal_dir(src, A))
if(isliving(A) && !(A in target))
Aim(A) //Clicked a mob, aim at them
return 1
@@ -103,7 +103,7 @@
else
click_empty(M)
usr.dir = get_cardinal_dir(src, T)
usr.set_dir(get_cardinal_dir(src, T))
if (!firerate) // If firerate is set to lower aim after one shot, untarget the target
T.NotTargeted(src)

View File

@@ -1,3 +1,17 @@
/obj/item/weapon/storage/box/bloodpacks
name = "blood packs bags"
desc = "This box contains blood packs."
icon_state = "sterile"
New()
..()
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
new /obj/item/weapon/reagent_containers/blood/empty(src)
/obj/item/weapon/reagent_containers/blood
name = "BloodPack"
desc = "Contains blood used for transfusion."

View File

@@ -24,7 +24,7 @@
/obj/machinery/conveyor/New(loc, newdir, on = 0)
..(loc)
if(newdir)
dir = newdir
set_dir(newdir)
switch(dir)
if(NORTH)
forwards = NORTH

View File

@@ -111,7 +111,7 @@
usr << "You must unfasten the pipe before rotating it."
return
dir = turn(dir, -90)
set_dir(turn(dir, -90))
update()
verb/flip()
@@ -125,7 +125,7 @@
usr << "You must unfasten the pipe before flipping it."
return
dir = turn(dir, 180)
set_dir(turn(dir, 180))
switch(ptype)
if(2)
ptype = 3
@@ -260,7 +260,7 @@
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
src.transfer_fingerprints_to(P)
P.base_icon_state = base_state
P.dir = dir
P.set_dir(dir)
P.dpdir = dpdir
P.updateicon()
@@ -278,7 +278,7 @@
var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc)
src.transfer_fingerprints_to(P)
P.dir = dir
P.set_dir(dir)
var/obj/structure/disposalpipe/trunk/Trunk = CP
Trunk.linked = P
@@ -286,7 +286,7 @@
var/obj/machinery/disposal/deliveryChute/P = new /obj/machinery/disposal/deliveryChute(src.loc)
src.transfer_fingerprints_to(P)
P.dir = dir
P.set_dir(dir)
del(src)
return

View File

@@ -543,7 +543,7 @@
loc = D.trunk
active = 1
dir = DOWN
set_dir(DOWN)
spawn(1)
move() // spawn off the movement process
@@ -702,7 +702,7 @@
//
proc/transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir)
H.dir = nextdir
H.set_dir(nextdir)
var/turf/T = H.nextloc()
var/obj/structure/disposalpipe/P = H.findpipe(T)
@@ -808,7 +808,7 @@
for(var/D in cardinal)
if(D & dpdir)
var/obj/structure/disposalpipe/broken/P = new(src.loc)
P.dir = D
P.set_dir(D)
src.invisibility = 101 // make invisible (since we won't delete the pipe immediately)
var/obj/structure/disposalholder/H = locate() in src
@@ -919,7 +919,7 @@
if("pipe-tagger-partial")
C.ptype = 14
src.transfer_fingerprints_to(C)
C.dir = dir
C.set_dir(dir)
C.density = 0
C.anchored = 1
C.update()
@@ -965,7 +965,7 @@
transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir)
H.dir = nextdir
H.set_dir(nextdir)
var/turf/T
var/obj/structure/disposalpipe/P
@@ -1229,7 +1229,7 @@
transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir, H.destinationTag)
H.dir = nextdir
H.set_dir(nextdir)
var/turf/T = H.nextloc()
var/obj/structure/disposalpipe/P = H.findpipe(T)

View File

@@ -604,7 +604,7 @@ datum/design/posibrain
build_type = PROTOLATHE
materials = list("$metal" = 2000, "$glass" = 1000, "$silver" = 1000, "$gold" = 500, "$phoron" = 500, "$diamond" = 100)
build_path = /obj/item/device/mmi/posibrain
build_path = /obj/item/device/mmi/digital/posibrain
///////////////////////////////////
//////////Mecha Module Disks///////
@@ -1273,6 +1273,15 @@ datum/design/gas_cooler
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/unary_atmos/cooler
datum/design/secure_airlock
name = "Secure Airlock Electronics"
desc = "Tamper-resistant airlock electronics"
id = "securedoor"
req_tech = list("programming" = 3)
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/airlock_electronics/secure
/////////////////////////////////////////
////////////Power Stuff//////////////////
/////////////////////////////////////////
@@ -1812,7 +1821,7 @@ datum/design/borg_syndicate_module
/////////////PDA and Radio stuff/////////
/////////////////////////////////////////
datum/design/binaryencrypt
name = "Binary Encrpytion Key"
name = "binary encryption key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
id = "binaryencrypt"
req_tech = list("syndicate" = 2)

View File

@@ -322,7 +322,7 @@
if(anchored)
usr << "\red You cannot rotate [src], it has been firmly fixed to the floor."
else
dir = turn(dir, 90)
set_dir(turn(dir, 90))
/obj/machinery/suspension_gen/verb/rotate_cw()
set src in view(1)
@@ -332,7 +332,7 @@
if(anchored)
usr << "\red You cannot rotate [src], it has been firmly fixed to the floor."
else
dir = turn(dir, -90)
set_dir(turn(dir, -90))
/obj/effect/suspension_field
name = "energy field"

View File

@@ -22,7 +22,7 @@
/obj/item/device/beacon_locator/process()
if(target_radio)
dir = get_dir(src,target_radio)
set_dir(get_dir(src,target_radio))
switch(get_dist(src,target_radio))
if(0 to 3)
icon_state = "pinondirect"

View File

@@ -13,7 +13,7 @@
var/shield_idle_power = 1500 //how much power we use when just being sustained.
/obj/machinery/shield/New()
src.dir = pick(1,2,3,4)
src.set_dir(pick(1,2,3,4))
..()
update_nearby_tiles(need_rebuild=1)

View File

@@ -154,7 +154,7 @@
T2 = T
var/obj/machinery/shieldwall/CF = new/obj/machinery/shieldwall/(src, G) //(ref to this gen, ref to connected gen)
CF.loc = T
CF.dir = field_dir
CF.set_dir(field_dir)
/obj/machinery/shieldwallgen/attackby(obj/item/W, mob/user)

View File

@@ -149,5 +149,5 @@
if (src.anchored)
usr << "It is fastened to the floor!"
return
src.dir = turn(src.dir, 270)
src.set_dir(turn(src.dir, 270))
return

View File

@@ -6,4 +6,4 @@
/obj/machinery/computer/shuttle_control/multi/syndicate
name = "Syndicate control console"
req_access = list(access_syndicate)
shuttle_tag = "Syndicate"
shuttle_tag = "Mercenary"

View File

@@ -1,9 +1,9 @@
#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
/*
How to tweak the SM
@@ -17,10 +17,10 @@
//Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game.
#define POWER_FACTOR 1.0
#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays
#define CRITICAL_TEMPERATURE 800 //K
#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays
#define CRITICAL_TEMPERATURE 800 //K
#define CHARGING_FACTOR 0.05
#define DAMAGE_RATE_LIMIT 3 //damage rate cap at power = 300, scales linearly with power
#define DAMAGE_RATE_LIMIT 3 //damage rate cap at power = 300, scales linearly with power
//These would be what you would get at point blank, decreases with distance
@@ -28,7 +28,7 @@
#define DETONATION_HALLUCINATION 600
#define WARNING_DELAY 30 //seconds between warnings.
#define WARNING_DELAY 20 //seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -46,6 +46,7 @@
var/damage = 0
var/damage_archived = 0
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
var/safe_warned = 0
var/warning_point = 100
var/warning_alert = "Danger! Crystal hyperstructure instability!"
var/emergency_point = 700
@@ -58,15 +59,20 @@
var/grav_pulling = 0
var/pull_radius = 14
// Time in ticks between delamination ('exploding') and exploding (as in the actual boom)
var/pull_time = 100
var/explosion_power = 8
var/emergency_issued = 0
var/explosion_power = 8
// Time in 1/10th of seconds since the last sent warning
var/lastwarning = 0
// This stops spawning redundand explosions. Also incidentally makes supermatter unexplodable if set to 1.
var/exploded = 0
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
var/power = 0
var/oxygen = 0 // Moving this up here for easier debugging.
var/oxygen = 0
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
@@ -80,22 +86,6 @@
var/debug = 0
shard //Small subtype, less efficient and more sensitive, but less boom.
name = "Supermatter Shard"
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
icon_state = "darkmatter_shard"
base_icon_state = "darkmatter_shard"
warning_point = 50
emergency_point = 500
explosion_point = 900
gasefficency = 0.125
pull_radius = 5
explosion_power = 3 //3,6,9,12? Or is that too small?
/obj/machinery/power/supermatter/New()
. = ..()
radio = new (src)
@@ -106,9 +96,20 @@
. = ..()
/obj/machinery/power/supermatter/proc/explode()
message_admins("Supermatter exploded at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Supermatter exploded at ([x],[y],[z])")
anchored = 1
grav_pulling = 1
spawn(100)
exploded = 1
for(var/mob/living/mob in living_mob_list)
if(loc.z == mob.loc.z)
if(istype(mob, /mob/living/carbon/human))
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
spawn(pull_time)
explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1)
del src
return
@@ -120,6 +121,28 @@
if(luminosity != lum)
SetLuminosity(lum)
/obj/machinery/power/supermatter/proc/announce_warning()
var/integrity = damage / explosion_point
integrity = round(100 - integrity * 100)
integrity = integrity < 0 ? 0 : integrity
var/alert_msg = " Integrity at [integrity]%"
if(damage > emergency_point)
alert_msg = emergency_alert + alert_msg
lastwarning = world.timeofday - WARNING_DELAY * 4
else if(damage >= damage_archived) // The damage is still going up
safe_warned = 0
alert_msg = warning_alert + alert_msg
lastwarning = world.timeofday
else if(!safe_warned)
safe_warned = 1 // We are safe, warn only once
alert_msg = safe_alert
lastwarning = world.timeofday
else
alert_msg = null
if(alert_msg)
radio.autosay(alert_msg, "Supermatter Monitor")
/obj/machinery/power/supermatter/process()
var/turf/L = loc
@@ -130,39 +153,17 @@
if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
shift_light(5, warning_color)
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
var/stability = num2text(round((damage / explosion_point) * 100))
var/alert_msg
if(damage > emergency_point)
shift_light(7, emergency_color)
alert_msg = addtext(emergency_alert, " Instability: ",stability,"%")
lastwarning = world.timeofday
else if(damage >= damage_archived) // The damage is still going up
alert_msg = addtext(warning_alert," Instability: ",stability,"%")
lastwarning = world.timeofday - 150
else // Phew, we're safe
alert_msg = safe_alert
lastwarning = world.timeofday
if(!istype(L, /turf/space) && alert_msg)
radio.autosay(alert_msg, "Supermatter Monitor")
if(damage > explosion_point)
for(var/mob/living/mob in living_mob_list)
if(loc.z == mob.loc.z)
if(istype(mob, /mob/living/carbon/human))
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
if(damage > explosion_point)
if(!exploded)
if(!istype(L, /turf/space))
announce_warning()
explode()
else if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
shift_light(5, warning_color)
if(damage > emergency_point)
shift_light(7, emergency_color)
if(!istype(L, /turf/space) && (world.timeofday - lastwarning) >= WARNING_DELAY * 10)
announce_warning()
else
shift_light(4,initial(l_color))
if(grav_pulling)
@@ -324,7 +325,6 @@
/obj/machinery/power/supermatter/proc/supermatter_pull()
//following is adapted from singulo code
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -363,4 +363,23 @@
return
/obj/machinery/power/supermatter/RepelAirflowDest(n)
return
return
/obj/machinery/power/supermatter/shard //Small subtype, less efficient and more sensitive, but less boom.
name = "Supermatter Shard"
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
icon_state = "darkmatter_shard"
base_icon_state = "darkmatter_shard"
warning_point = 50
emergency_point = 400
explosion_point = 600
gasefficency = 0.125
pull_radius = 5
pull_time = 45
explosion_power = 3
/obj/machinery/power/supermatter/shard/announce_warning() //Shards don't get announcements
return

View File

@@ -155,7 +155,7 @@
//latch with src as the follower
lead = T
T.tow = src
dir = lead.dir
set_dir(lead.dir)
if(user)
user << "\blue You hitch [src] to [T]."

View File

@@ -55,7 +55,7 @@
if(load)
load.forceMove(loc)// = loc
load.dir = dir
load.set_dir(dir)
return 1
else
@@ -140,7 +140,7 @@
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
pulse2.dir = pick(cardinal)
pulse2.set_dir(pick(cardinal))
spawn(10)
pulse2.delete()
@@ -154,9 +154,6 @@
/obj/vehicle/attack_ai(mob/user as mob)
return
/obj/vehicle/proc/handle_rotation()
return
//-------------------------------------------
// Vehicle procs
//-------------------------------------------
@@ -273,7 +270,7 @@
crate.close()
C.forceMove(loc)
C.dir = dir
C.set_dir(dir)
C.anchored = 1
load = C
@@ -325,7 +322,7 @@
return 0
load.forceMove(dest)
load.dir = get_dir(loc, dest)
load.set_dir(get_dir(loc, dest))
load.anchored = initial(load.anchored)
load.pixel_x = initial(load.pixel_x)
load.pixel_y = initial(load.pixel_y)