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

This commit is contained in:
Chinsky
2015-09-02 04:38:26 +03:00
157 changed files with 6573 additions and 6230 deletions

View File

@@ -281,8 +281,8 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
var/direct = !(block & ZONE_BLOCKED)
var/space = !istype(B)
if(direct && !space)
if(min(A.zone.contents.len, B.zone.contents.len) <= ZONE_MIN_SIZE || equivalent_pressure(A.zone,B.zone) || current_cycle == 0)
if(!space)
if(min(A.zone.contents.len, B.zone.contents.len) < ZONE_MIN_SIZE || (direct && (equivalent_pressure(A.zone,B.zone) || current_cycle == 0)))
merge(A.zone,B.zone)
return

View File

@@ -43,8 +43,8 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
#define NETWORK_MINE "MINE"
#define NETWORK_RESEARCH "Research"
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
#define NETWORK_PRISON "Prison"
#define NETWORK_ROBOTS "Robots"
#define NETWORK_PRISON "Prison"
#define NETWORK_SECURITY "Security"
#define NETWORK_TELECOM "Tcomsat"
#define NETWORK_THUNDER "thunder"

View File

@@ -64,6 +64,8 @@ var/global/list/rune_list = new()
var/global/list/escape_list = list()
var/global/list/endgame_exits = list()
var/global/list/endgame_safespawns = list()
var/global/list/syndicate_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
//////////////////////////
/////Initial Building/////
//////////////////////////

View File

@@ -36,9 +36,12 @@ proc/round_duration()
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
var/mins = (mills % 36000) / 600
var/hours = mills / 36000
var/mins = round((mills % 36000) / 600)
var/hours = round(mills / 36000)
last_round_duration = "[round(hours)]h [round(mins)]m"
mins = mins < 10 ? add_zero(mins, 1) : mins
hours = hours < 10 ? add_zero(hours, 1) : hours
last_round_duration = "[hours]:[mins]"
next_duration_update = world.time + 1 MINUTES
return last_round_duration

View File

@@ -31,7 +31,7 @@
build_click(src, client.buildmode, params, A)
return
if(control_disabled || stat)
if(stat)
return
var/list/modifiers = params2list(params)
@@ -51,7 +51,7 @@
CtrlClickOn(A)
return
if(!canClick())
if(control_disabled || !canClick())
return
if(aiCamera.in_camera_mode)
@@ -89,13 +89,24 @@
*/
/mob/living/silicon/ai/ShiftClickOn(var/atom/A)
A.AIShiftClick(src)
if(!control_disabled && A.AIShiftClick(src))
return
..()
/mob/living/silicon/ai/CtrlClickOn(var/atom/A)
A.AICtrlClick(src)
if(!control_disabled && A.AICtrlClick(src))
return
..()
/mob/living/silicon/ai/AltClickOn(var/atom/A)
A.AIAltClick(src)
if(!control_disabled && A.AIAltClick(src))
return
..()
/mob/living/silicon/ai/MiddleClickOn(var/atom/A)
A.AIMiddleClick(src)
if(!control_disabled && A.AIMiddleClick(src))
return
..()
/*
The following criminally helpful code is just the previous code cleaned up;
@@ -105,11 +116,6 @@
/atom/proc/AICtrlShiftClick()
return
/obj/machinery/door/airlock/AICtrlShiftClick()
if(emagged)
return
return
/atom/proc/AIShiftClick()
return
@@ -118,7 +124,7 @@
Topic(src, list("src"= "\ref[src]", "command"="open", "activate" = "1"), 1) // 1 meaning no window (consistency!)
else
Topic(src, list("src"= "\ref[src]", "command"="open", "activate" = "0"), 1)
return
return 1
/atom/proc/AICtrlClick()
return
@@ -128,15 +134,18 @@
Topic(src, list("src"= "\ref[src]", "command"="bolts", "activate" = "0"), 1)// 1 meaning no window (consistency!)
else
Topic(src, list("src"= "\ref[src]", "command"="bolts", "activate" = "1"), 1)
return 1
/obj/machinery/power/apc/AICtrlClick() // turns off/on APCs.
Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!)
return 1
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
Topic(src, list("src"= "\ref[src]", "command"="enable", "value"="[!enabled]"), 1) // 1 meaning no window (consistency!)
return 1
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
return AltClick(A)
/obj/machinery/door/airlock/AIAltClick() // Electrifies doors.
if(!electrified_until)
@@ -145,20 +154,25 @@
else
// disable/6 is not in Topic; disable/5 disables both temporary and permanent shock
Topic(src, list("src"= "\ref[src]", "command"="electrify_permanently", "activate" = "0"), 1)
return
return 1
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
Topic(src, list("src"= "\ref[src]", "command"="lethal", "value"="[!lethal]"), 1) // 1 meaning no window (consistency!)
return 1
/atom/proc/AIMiddleClick()
return
/atom/proc/AIMiddleClick(var/mob/living/silicon/user)
return 0
/obj/machinery/door/airlock/AIMiddleClick() // Toggles door bolt lights.
if(..())
return
if(!src.lights)
Topic(src, list("src"= "\ref[src]", "command"="lights", "activate" = "1"), 1) // 1 meaning no window (consistency!)
else
Topic(src, list("src"= "\ref[src]", "command"="lights", "activate" = "0"), 1)
return
return 1
//
// Override AdjacentQuick for AltClicking

View File

@@ -106,11 +106,9 @@
var/sdepth = A.storage_depth(src)
if((!isturf(A) && A == loc) || (sdepth != -1 && sdepth <= 1))
// faster access to objects already on you
if(A in contents)
setMoveCooldown(5) //taking an item off of an inventory slot
else
if(A.loc != src)
setMoveCooldown(10) //getting something out of a backpack
if(W)
var/resolved = W.resolve_attackby(A, src)
if(!resolved && A && W)
@@ -129,8 +127,8 @@
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
if(A.Adjacent(src)) // see adjacent.dm
setMoveCooldown(10)
setMoveCooldown(5)
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = W.resolve_attackby(A,src)
@@ -226,10 +224,8 @@
Only used for swapping hands
*/
/mob/proc/MiddleClickOn(var/atom/A)
return
/mob/living/carbon/MiddleClickOn(var/atom/A)
swap_hand()
return
// In case of use break glass
/*
@@ -280,7 +276,7 @@
else
user.listed_turf = T
user.client.statpanel = T.name
return
return 1
/mob/proc/TurfAdjacent(var/turf/T)
return T.AdjacentQuick(src)

View File

@@ -26,7 +26,7 @@
// Otherwise jump
else
following = null
loc = get_turf(A)
forceMove(get_turf(A))
/mob/dead/observer/ClickOn(var/atom/A, var/params)
if(client.buildmode)

View File

@@ -29,34 +29,53 @@
src << "Somehow you bugged the system. Setting your hardsuit mode to middle-click."
hardsuit_click_mode = MIDDLE_CLICK
/mob/living/carbon/human/MiddleClickOn(atom/A)
/mob/living/MiddleClickOn(atom/A)
if(client && client.hardsuit_click_mode == MIDDLE_CLICK)
if(HardsuitClickOn(A))
return
..()
/mob/living/carbon/human/AltClickOn(atom/A)
/mob/living/AltClickOn(atom/A)
if(client && client.hardsuit_click_mode == ALT_CLICK)
if(HardsuitClickOn(A))
return
..()
/mob/living/carbon/human/CtrlClickOn(atom/A)
/mob/living/CtrlClickOn(atom/A)
if(client && client.hardsuit_click_mode == CTRL_CLICK)
if(HardsuitClickOn(A))
return
..()
/mob/living/carbon/human/proc/HardsuitClickOn(atom/A)
if(!canClick())
return
if(back)
var/obj/item/weapon/rig/rig = back
if(istype(rig) && rig.selected_module)
rig.selected_module.engage(A)
if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return 1
/mob/living/proc/can_use_rig()
return 0
/mob/living/carbon/human/can_use_rig()
return 1
/mob/living/carbon/brain/can_use_rig()
return istype(loc, /obj/item/device/mmi)
/mob/living/silicon/ai/can_use_rig()
return carded
/mob/living/silicon/pai/can_use_rig()
return loc == card
/mob/living/proc/HardsuitClickOn(var/atom/A, var/alert_ai = 0)
if(!can_use_rig() || !canClick())
return 0
var/obj/item/weapon/rig/rig = get_rig()
if(istype(rig) && !rig.offline && rig.selected_module)
if(src != rig.wearer)
if(rig.ai_can_move_suit(src, check_user_module = 1))
message_admins("[key_name_admin(src, include_name = 1)] is trying to force \the [key_name_admin(rig.wearer, include_name = 1)] to use a hardsuit module.")
else
return 0
rig.selected_module.engage(A, alert_ai)
if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return 1
return 0
#undef MIDDLE_CLICK

View File

@@ -111,16 +111,12 @@ var/const/tk_maxrange = 15
if(0)
;
if(1 to 5) // not adjacent may mean blocked by window
;
//TODO replace these with movement timeouts
//if(!proximity)
// user.next_move += 2
if(!proximity)
user.setMoveCooldown(2)
if(5 to 7)
;
//user.next_move += 5
user.setMoveCooldown(5)
if(8 to tk_maxrange)
;
//user.next_move += 10
user.setMoveCooldown(10)
else
user << "<span class='notice'>Your mind won't reach that far.</span>"
return

View File

@@ -6,6 +6,7 @@
/datum/controller/process/machinery/doWork()
internal_sort()
internal_process_pipenets()
internal_process_machinery()
internal_process_power()
internal_process_power_drain()
@@ -57,6 +58,14 @@
processing_power_items.Remove(I)
scheck()
/datum/controller/process/machinery/proc/internal_process_pipenets()
for(var/datum/pipe_network/pipeNetwork in pipe_networks)
if(istype(pipeNetwork) && !pipeNetwork.disposed)
pipeNetwork.process()
scheck()
continue
pipe_networks.Remove(pipeNetwork)
/datum/controller/process/machinery/getStatName()
return ..()+"([machines.len])"
return ..()+"(MCH:[machines.len] PWR:[powernets.len] PIP:[pipe_networks.len])"

View File

@@ -1,15 +0,0 @@
/datum/controller/process/pipenet/setup()
name = "pipenet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/pipenet/doWork()
for(var/datum/pipe_network/pipeNetwork in pipe_networks)
if(istype(pipeNetwork) && !pipeNetwork.disposed)
pipeNetwork.process()
scheck()
continue
pipe_networks.Remove(pipeNetwork)
/datum/controller/process/pipenet/getStatName()
return ..()+"([pipe_networks.len])"

View File

@@ -161,7 +161,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(A.emagged) return
if(!A.requiresID() || A.check_access(null))
if(A.density) A.open()
else A.close()
else A.close()
if(AIRLOCK_WIRE_SAFETY)
A.safe = !A.safe
if(!A.density)

View File

@@ -111,7 +111,6 @@
return 0
//Grab candidates randomly until we have enough.
candidates = shuffle(candidates)
while(candidates.len && pending_antagonists.len < cur_max)
var/datum/mind/player = pick(candidates)
candidates -= player
@@ -121,11 +120,18 @@
/datum/antagonist/proc/draft_antagonist(var/datum/mind/player)
//Check if the player can join in this antag role, or if the player has already been given an antag role.
if(!can_become_antag(player) || player.special_role)
if(!can_become_antag(player))
log_debug("[player.key] was selected for [role_text] by lottery, but is not allowed to be that role.")
return 0
if(player.special_role)
log_debug("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
return 0
if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || istype(player.current, /mob/new_player)))
log_debug("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
return 0
pending_antagonists |= player
log_debug("[player.key] has been selected for [role_text] by lottery.")
//Ensure that antags with ANTAG_OVERRIDE_JOB do not occupy job slots.
if(flags & ANTAG_OVERRIDE_JOB)

View File

@@ -36,7 +36,7 @@
if(!W) return
W.access |= default_access
W.assignment = "[assignment]"
W.set_owner_info(player)
player.set_id_info(W)
if(equip) player.equip_to_slot_or_del(W, slot_wear_id)
return W

View File

@@ -19,8 +19,7 @@
/datum/antagonist/proc/update_access(var/mob/living/player)
for(var/obj/item/weapon/card/id/id in player.contents)
id.name = "[player.real_name]'s ID Card"
id.registered_name = player.real_name
player.set_id_info(id)
/datum/antagonist/proc/update_all_icons()
if(!antag_indicator)

View File

@@ -104,9 +104,9 @@ var/datum/antagonist/cultist/cult
player.current.visible_message("<FONT size = 3>[player.current] looks like they just reverted to their old faith!</FONT>")
/datum/antagonist/cultist/add_antagonist(var/datum/mind/player)
if(!..())
return
player << "You catch a glimpse of the Realm of Nar-Sie, the Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of That Which Waits. Assist your new compatriots in their dark dealings. Their goals are yours, and yours are theirs. You serve the Dark One above all else. Bring It back."
. = ..()
if(.)
player << "You catch a glimpse of the Realm of Nar-Sie, the Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of That Which Waits. Assist your new compatriots in their dark dealings. Their goals are yours, and yours are theirs. You serve the Dark One above all else. Bring It back."
/datum/antagonist/cultist/can_become_antag(var/datum/mind/player)
if(!..())

View File

@@ -98,6 +98,7 @@ var/list/ghostteleportlocs = list()
icon_state = "space"
requires_power = 1
always_unpowered = 1
lighting_use_dynamic = 0
power_light = 0
power_equip = 0
power_environ = 0

View File

@@ -8,14 +8,10 @@
//check if it doesn't require any access at all
if(src.check_access(null))
return 1
if(istype(M, /mob/living/silicon))
//AI can do whatever he wants
return 1
else if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
//if they are holding or wearing a card that has access, that works
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
return 1
var/id = M.GetIdCard()
if(id)
return check_access(id)
return 0
/obj/item/proc/GetAccess()
@@ -191,18 +187,27 @@
"Emergency Response Team",
"Emergency Response Team Leader")
proc/GetIdCard(var/mob/living/carbon/human/H)
if(H.wear_id)
var/id = H.wear_id.GetID()
/mob/proc/GetIdCard()
return null
/mob/living/bot/GetIdCard()
return botcard
/mob/living/carbon/human/GetIdCard()
if(wear_id)
var/id = wear_id.GetID()
if(id)
return id
if(H.get_active_hand())
var/obj/item/I = H.get_active_hand()
if(get_active_hand())
var/obj/item/I = get_active_hand()
return I.GetID()
/mob/living/silicon/GetIdCard()
return idcard
proc/FindNameFromID(var/mob/living/carbon/human/H)
ASSERT(istype(H))
var/obj/item/weapon/card/id/C = GetIdCard(H)
var/obj/item/weapon/card/id/C = H.GetIdCard()
if(C)
return C.registered_name

View File

@@ -96,7 +96,6 @@
economic_modifier = 5
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels)
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels)
alt_titles = list("Forensic Technician")
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -131,10 +130,11 @@
department = "Security"
department_flag = ENGSEC
faction = "Station"
total_positions = 3
spawn_positions = 3
total_positions = 4
spawn_positions = 4
supervisors = "the head of security"
selection_color = "#ffeeee"
alt_titles = list("Junior Officer")
economic_modifier = 4
access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_external_airlocks)

View File

@@ -528,7 +528,7 @@ var/global/datum/controller/occupations/job_master
if(C)
C.rank = rank
C.assignment = title ? title : rank
C.set_owner_info(H)
H.set_id_info(C)
//put the player's account number onto the ID
if(H.mind && H.mind.initial_account)

View File

@@ -20,10 +20,10 @@
/obj/machinery/cablelayer/attack_hand(mob/user as mob)
if(!cable&&!on)
user << "\The [src] don't work with no cable."
user << "<span class='warning'>\The [src] doesn't have any cable loaded.</span>"
return
on=!on
user.visible_message("\The [src] [!on?"dea":"a"]ctivated.", "[user] [!on?"dea":"a"]ctivated \the [src].")
user.visible_message("\The [user] [!on?"dea":"a"]ctivates \the [src].", "You switch [src] [on? "on" : "off"]")
return
/obj/machinery/cablelayer/attackby(var/obj/item/O as obj, var/mob/user as mob)
@@ -31,26 +31,27 @@
var/result = load_cable(O)
if(!result)
user << "Reel is full."
user << "<span class='warning'>\The [src]'s cable reel is full.</span>"
else
user << "[result] meters of cable successfully loaded."
user << "You load [result] lengths of cable into [src]."
return
if(istype(O, /obj/item/weapon/screwdriver))
if(istype(O, /obj/item/weapon/wirecutters))
if(cable && cable.amount)
var/m = round(input(usr,"Please specify the length of cable to cut","Cut cable",min(cable.amount,30)) as num, 1)
m = min(m, cable.amount)
m = min(m, 30)
if(m)
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
use_cable(m)
var/obj/item/stack/cable_coil/CC = new (get_turf(src))
CC.amount = m
else
usr << "There's no more cable on the reel."
usr << "<span class='warning'>There's no more cable on the reel.</span>"
/obj/machinery/cablelayer/examine(mob/user)
..()
user << "\The [src] has [cable.amount] meter\s."
user << "\The [src]'s cable reel has [cable.amount] length\s left."
/obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC)
if(istype(CC) && CC.amount)
@@ -70,12 +71,11 @@
/obj/machinery/cablelayer/proc/use_cable(amount)
if(!cable || cable.amount<1)
visible_message("Cable depleted, [src] deactivated.")
visible_message("A red light flashes on \the [src].")
return
/* if(cable.amount < amount)
visible_message("No enough cable to finish the task.")
return*/
cable.use(amount)
if(deleted(cable))
cable = null
return 1
/obj/machinery/cablelayer/proc/reset()

View File

@@ -396,6 +396,12 @@
hidden = 1
category = "Devices and Components"
/datum/autolathe/recipe/beartrap
name = "mechanical trap"
path = /obj/item/weapon/beartrap
hidden = 1
category = "Devices and Components"
/datum/autolathe/recipe/welder_industrial
name = "industrial welding tool"
path = /obj/item/weapon/weldingtool/largetank

View File

@@ -223,6 +223,9 @@ mob/living/proc/near_camera()
/mob/living/proc/tracking_status()
// Easy checks first.
// Don't detect mobs on Centcom. Since the wizard den is on Centcomm, we only need this.
var/obj/item/weapon/card/id/id = GetIdCard()
if(id && id.prevent_tracking())
return TRACKING_TERMINATE
if(InvalidPlayerTurf(get_turf(src)))
return TRACKING_TERMINATE
if(invisibility >= INVISIBILITY_LEVEL_ONE) //cloaked
@@ -240,14 +243,8 @@ mob/living/proc/near_camera()
if(. == TRACKING_NO_COVERAGE)
return camera && camera.can_use() ? TRACKING_POSSIBLE : TRACKING_NO_COVERAGE
/mob/living/silicon/robot/syndicate/tracking_status()
return TRACKING_TERMINATE
/mob/living/carbon/human/tracking_status()
//Cameras can't track people wearing an agent card or a ninja hood.
var/obj/item/weapon/card/id/id = GetIdCard(src)
if(id && id.prevent_tracking())
return TRACKING_TERMINATE
if(istype(head, /obj/item/clothing/head/helmet/space/rig))
var/obj/item/clothing/head/helmet/space/rig/helmet = head
if(helmet.prevent_track())

View File

@@ -257,3 +257,7 @@
icon_state = "syndicam"
network = list("NUKE")
circuit = null
/obj/machinery/computer/security/nuclear/New()
..()
req_access = list(150)

View File

@@ -59,12 +59,10 @@
if(!istype(id_card))
return ..()
if(!scan && access_change_ids in id_card.access)
user.drop_item()
if(!scan && (access_change_ids in id_card.access) && user.unEquip(id_card))
id_card.loc = src
scan = id_card
else if(!modify)
user.drop_item()
id_card.loc = src
modify = id_card
@@ -157,8 +155,7 @@
modify = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
modify = I

View File

@@ -62,13 +62,14 @@
/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
if(istype(O, /obj/item/weapon/card/id))
if(!giver)
user.drop_item()
if(!giver && user.unEquip(O))
O.loc = src
giver = O
updateUsrDialog()
else
else if(giver)
user << "<span class='warning'>There is already ID card inside.</span>"
return
..()
/obj/machinery/computer/guestpass/attack_ai(var/mob/user as mob)
return attack_hand(user)
@@ -151,8 +152,7 @@
accesses.Cut()
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
giver = I
updateUsrDialog()

View File

@@ -35,13 +35,13 @@
usr << "There is nothing to remove from the console."
return
/obj/machinery/computer/med_data/attackby(obj/item/O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id) && !scan)
usr.drop_item()
/obj/machinery/computer/med_data/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/weapon/card/id) && !scan && user.unEquip(O))
O.loc = src
scan = O
user << "You insert [O]."
..()
user << "You insert \the [O]."
else
..()
/obj/machinery/computer/med_data/attack_ai(user as mob)
return src.attack_hand(user)

View File

@@ -248,8 +248,7 @@ What a mess.*/
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
scan = I

View File

@@ -24,13 +24,13 @@
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
/obj/machinery/computer/skills/attackby(obj/item/O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id) && !scan)
usr.drop_item()
/obj/machinery/computer/skills/attackby(obj/item/O as obj, var/mob/user)
if(istype(O, /obj/item/weapon/card/id) && !scan && user.unEquip(O))
O.loc = src
scan = O
user << "You insert [O]."
..()
else
..()
/obj/machinery/computer/skills/attack_ai(mob/user as mob)
return attack_hand(user)
@@ -185,8 +185,7 @@ What a mess.*/
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
I.loc = src
scan = I

View File

@@ -181,7 +181,7 @@
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
computer.cardslot.insert(I, 1)
scan = I
@@ -194,7 +194,7 @@
scan2 = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
computer.cardslot.insert(I, 2)
scan2 = I

View File

@@ -254,7 +254,7 @@ What a mess.*/
scan = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
computer.cardslot.insert(I, 1)
scan = I
@@ -267,7 +267,7 @@ What a mess.*/
scan2 = null
else
var/obj/item/I = usr.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
if (istype(I, /obj/item/weapon/card/id) && usr.drop_item(I))
computer.cardslot.insert(I, 2)
scan2 = I

View File

@@ -254,6 +254,7 @@
health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth)
update_icon()
qdel(repairing)
repairing = null
return
if(repairing && istype(I, /obj/item/weapon/crowbar))

View File

@@ -0,0 +1,117 @@
// Used to deploy the bacon.
/obj/item/supply_beacon
name = "inactive supply beacon"
icon = 'icons/obj/supplybeacon.dmi'
desc = "An inactive, hacked supply beacon stamped with the Nyx Rapid Fabrication logo. Good for one (1) ballistic supply pod shipment."
icon_state = "beacon"
var/deploy_path = /obj/machinery/power/supply_beacon
var/deploy_time = 30
/obj/item/supply_beacon/supermatter
name = "inactive supermatter supply beacon"
deploy_path = /obj/machinery/power/supply_beacon/supermatter
/obj/item/supply_beacon/attack_self(var/mob/user)
user.visible_message("<span class='notice'>\The [user] begins setting up \the [src].</span>")
if(!do_after(user, deploy_time))
return
var/obj/S = new deploy_path(get_turf(user))
user.visible_message("<span class='notice'>\The [user] deploys \the [S].</span>")
user.unEquip(src)
qdel(src)
/obj/machinery/power/supply_beacon
name = "supply beacon"
desc = "A bulky moonshot supply beacon. Someone has been messing with the wiring."
icon = 'icons/obj/supplybeacon.dmi'
icon_state = "beacon"
anchored = 0
density = 1
layer = MOB_LAYER - 0.1
stat = 0
var/target_drop_time
var/drop_delay = 450
var/expended
var/drop_type
/obj/machinery/power/supply_beacon/New()
..()
if(!drop_type) drop_type = pick(supply_drop_random_loot_types())
/obj/machinery/power/supply_beacon/supermatter
name = "supermatter supply beacon"
drop_type = "supermatter"
/obj/machinery/power/supply_beacon/attackby(var/obj/item/weapon/W, var/mob/user)
if(!use_power && istype(W, /obj/item/weapon/wrench))
if(!anchored && !connect_to_network())
user << "<span class='warning'>This device must be placed over an exposed cable.</span>"
return
anchored = !anchored
user.visible_message("<span class='notice'>\The [user] [anchored ? "secures" : "unsecures"] \the [src].</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
return
return ..()
/obj/machinery/power/supply_beacon/attack_hand(var/mob/user)
if(expended)
use_power = 0
user << "<span class='warning'>\The [src] has used up its charge.</span>"
return
if(anchored)
return use_power ? deactivate(user) : activate(user)
else
user << "<span class='warning'>You need to secure the beacon with a wrench first!</span>"
return
/obj/machinery/power/supply_beacon/attack_ai(var/mob/user)
if(user.Adjacent(src))
attack_hand(user)
/obj/machinery/power/supply_beacon/proc/activate(var/mob/user)
if(expended)
return
if(surplus() < 500)
if(user) user << "<span class='notice'>The connected wire doesn't have enough current.</span>"
return
set_light(3, 3, "#00CCAA")
icon_state = "beacon_active"
use_power = 1
if(user) user << "<span class='notice'>You activate the beacon. The supply drop will be dispatched soon.</span>"
/obj/machinery/power/supply_beacon/proc/deactivate(var/mob/user, var/permanent)
if(permanent)
expended = 1
icon_state = "beacon_depleted"
else
icon_state = "beacon"
set_light(0)
use_power = 0
target_drop_time = null
if(user) user << "<span class='notice'>You deactivate the beacon.</span>"
/obj/machinery/power/supply_beacon/Destroy()
if(use_power)
deactivate()
..()
/obj/machinery/power/supply_beacon/process()
if(!use_power || expended)
return PROCESS_KILL
if(draw_power(500) < 500)
deactivate()
return
if(!target_drop_time)
target_drop_time = world.time + drop_delay
else if(world.time >= target_drop_time)
deactivate(permanent = 1)
var/drop_x = src.x-2
var/drop_y = src.y-2
var/drop_z = src.z
command_announcement.Announce("Nyx Rapid Fabrication priority supply request #[rand(1000,9999)]-[rand(100,999)] recieved. Shipment dispatched via ballistic supply pod for immediate delivery. Have a nice day.", "Thank You For Your Patronage")
spawn(rand(100,300))
new /datum/random_map/droppod/supply(null, drop_x, drop_y, drop_z, supplied_drop = drop_type) // Splat.

View File

@@ -4,6 +4,7 @@
icon_state = "x2"
anchored = 1.0
unacidable = 1
simulated = 0
/obj/effect/landmark/New()
..()

View File

@@ -1142,21 +1142,22 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(choice == 1)
if (id)
remove_id()
return 1
else
var/obj/item/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id))
user.drop_item()
if (istype(I, /obj/item/weapon/card/id) && user.unEquip(I))
I.loc = src
id = I
return 1
else
var/obj/item/weapon/card/I = user.get_active_hand()
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if (istype(I, /obj/item/weapon/card/id) && I:registered_name && user.unEquip(I))
var/obj/old_id = id
user.drop_item()
I.loc = src
id = I
user.put_in_hands(old_id)
return
return 1
return 0
// access to status display signals
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
@@ -1184,9 +1185,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
id_check(user, 2)
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
if(id_check(user, 2))
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)

View File

@@ -105,12 +105,13 @@
if(istype(ai.loc, /turf/))
new /obj/structure/AIcore/deactivated(get_turf(ai))
ai.carded = 1
admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card")
src.name = "[initial(name)] - [ai.name]"
ai.loc = src
ai.cancel_camera()
ai.destroy_eyeobj(src)
ai.cancel_camera()
ai.control_disabled = 1
ai.aiRestorePowerRoutine = 0
carded_ai = ai
@@ -120,10 +121,14 @@
if(user.client)
user << "<span class='notice'><b>Transfer successful:</b></span> [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
ai.canmove = 1
update_icon()
return 1
/obj/item/device/aicard/proc/clear()
if(carded_ai && istype(carded_ai.loc, /turf))
carded_ai.canmove = 0
carded_ai.carded = 0
name = initial(name)
carded_ai = null
update_icon()
@@ -140,10 +145,9 @@
carded_ai.show_message(rendered, type)
..()
/*
/obj/item/device/aicard/relaymove(var/mob/user, var/direction)
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc.loc
if(!module.holder || !direction)
return
module.holder.forced_move(direction)*/
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.forced_move(direction, user)

View File

@@ -16,14 +16,9 @@
/obj/item/device/flashlight/initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
else
icon_state = initial(icon_state)
set_light(0)
update_icon()
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
/obj/item/device/flashlight/update_icon()
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
@@ -36,7 +31,7 @@
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
return 0
on = !on
update_brightness(user)
update_icon()
user.update_action_buttons()
return 1
@@ -171,11 +166,7 @@
on = 0
src.force = initial(src.force)
src.damtype = initial(src.damtype)
if(ismob(loc))
var/mob/U = loc
update_brightness(U)
else
update_brightness(null)
update_icon()
/obj/item/device/flashlight/flare/attack_self(mob/user)
@@ -206,10 +197,11 @@
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
..()
set_light(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
/obj/item/device/flashlight/slime/update_icon()
return
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.

View File

@@ -10,12 +10,12 @@
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
/*/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc.loc
if(!module.holder || !direction)
return
module.holder.forced_move(direction)*/
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.forced_move(direction, user)
/obj/item/device/paicard/New()
..()

View File

@@ -365,10 +365,10 @@ datum/uplink_item/dd_SortValue()
item_cost = 7
path = /obj/item/weapon/aiModule/syndicate
/datum/uplink_item/item/tools/singularity_beacon
name = "Singularity Beacon (DANGER!)"
/datum/uplink_item/item/tools/supply_beacon
name = "Hacked Supply Beacon (DANGER!)"
item_cost = 7
path = /obj/item/device/radio/beacon/syndicate
path = /obj/item/supply_beacon
/datum/uplink_item/item/tools/teleporter
name = "Teleporter Circuit Board"
@@ -622,7 +622,7 @@ var/image/default_abstract_uplink_icon
if(!user)
return 0
var/obj/item/weapon/card/id/I = GetIdCard(user)
var/obj/item/weapon/card/id/I = user.GetIdCard()
var/datum/data/record/random_general_record
var/datum/data/record/random_medical_record
if(data_core.general.len)

View File

@@ -33,12 +33,12 @@ obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if(isnull(insults))
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.show_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>",1)
user.audible_message("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
else
if(insults > 0)
playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
user.show_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>")
user.audible_message("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
insults--
else
user << "<span class='danger'>*BZZZZZZZZT*</span>"

View File

@@ -31,10 +31,10 @@
R.modtype = initial(R.modtype)
R.hands.icon_state = initial(R.hands.icon_state)
R.choose_icon(1, R.set_module_sprites(list("Default" = "robot")))
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
R.module.Reset(R)
qdel(R.module)
R.module = null
R.updatename("Default")
return 1

View File

@@ -184,11 +184,9 @@
if(!uses_charge)
amount -= used
if (amount <= 0)
spawn(0) //delete the empty stack once the current context yields
if (amount <= 0) //check again in case someone transferred stuff to us
if(usr)
usr.remove_from_mob(src)
qdel(src)
if(usr)
usr.remove_from_mob(src)
qdel(src) //should be safe to qdel immediately since if someone is still using this stack it will persist for a little while longer
return 1
else
if(get_amount() < used)

View File

@@ -122,8 +122,9 @@
return 0
/obj/item/weapon/card/id/proc/show(mob/user as mob)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
if(front && side)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
var/datum/browser/popup = new(user, "idcard", name, 600, 250)
popup.set_content(dat())
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
@@ -137,17 +138,21 @@
front = getFlatIcon(M, SOUTH, always_use_defdir = 1)
side = getFlatIcon(M, WEST, always_use_defdir = 1)
/obj/item/weapon/card/id/proc/set_owner_info(var/mob/living/carbon/human/H)
if(!H || !H.dna)
return
age = H.age
blood_type = H.dna.b_type
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
registered_name = H.real_name
sex = capitalize(H.gender)
set_id_photo(H)
update_name()
/mob/proc/set_id_info(var/obj/item/weapon/card/id/id_card)
id_card.age = 0
id_card.registered_name = real_name
id_card.sex = capitalize(gender)
id_card.set_id_photo(src)
if(dna)
id_card.blood_type = dna.b_type
id_card.dna_hash = dna.unique_enzymes
id_card.fingerprint_hash= md5(dna.uni_identity)
id_card.update_name()
/mob/living/carbon/human/set_id_info(var/obj/item/weapon/card/id/id_card)
..()
id_card.age = age
/obj/item/weapon/card/id/proc/dat()
var/dat = ("<table><tr><td>")
@@ -213,9 +218,20 @@
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/captains_spare/New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/synthetic
name = "\improper Synthetic ID"
desc = "Access module for NanoTrasen Synthetics"
icon_state = "id-robot"
item_state = "tdgreen"
assignment = "Synthetic"
/obj/item/weapon/card/id/synthetic/New()
access = get_all_station_access()
..()
/obj/item/weapon/card/id/centcom
name = "\improper CentCom. ID"

View File

@@ -6,12 +6,11 @@ var/global/list/syndicate_ids = list()
origin_tech = list(TECH_ILLEGAL = 3)
var/electronic_warfare = 1
var/registered_user = null
var/list/initial_access = list(access_maint_tunnels, access_syndicate, access_external_airlocks)
/obj/item/weapon/card/id/syndicate/New(mob/user as mob)
syndicate_ids += src
..()
access = initial_access.Copy()
access = syndicate_access.Copy()
/obj/item/weapon/card/id/syndicate/Destroy()
syndicate_ids -= src
@@ -39,8 +38,8 @@ var/global/list/syndicate_ids = list()
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!registered_user)
registered_user = user
set_owner_info(user)
user << "<span class='notice'>The microscanner marks you as its owner, preventing others some accessing its internals.</span>"
user.set_id_info(src)
user << "<span class='notice'>The microscanner marks you as its owner, preventing others from accessing its internals.</span>"
if(registered_user == user)
switch(alert("Would you like edit the ID, or show it?","Show or Edit?", "Edit","Show"))
if("Edit")
@@ -163,7 +162,7 @@ var/global/list/syndicate_ids = list()
if("Factory Reset")
if(alert("This will factory reset the card, including access and owner. Continue?", "Factory Reset", "No", "Yes") == "Yes" && CanUseTopic(user, state))
age = initial(age)
access = initial_access.Copy()
access = syndicate_access.Copy()
assignment = initial(assignment)
blood_type = initial(blood_type)
dna_hash = initial(dna_hash)

View File

@@ -62,8 +62,7 @@
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
..()
if(ismob(AM))
if(isliving(AM))
var/mob/M = AM
if(M.buckled) //wheelchairs, office chairs, rollerbeds

View File

@@ -224,6 +224,9 @@
//Set the stop_messages to stop it from printing messages
/obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W)) return //Not an item
if(!usr.canUnEquip(W))
return 0
if(src.loc == W)
return 0 //Means the item is already in the storage item

View File

@@ -9,6 +9,7 @@
throwforce = 0
w_class = 3
origin_tech = "materials=1"
matter = list(DEFAULT_WALL_MATERIAL = 18750)
var/deployed = 0
/obj/item/weapon/beartrap/suicide_act(mob/user)

View File

@@ -33,9 +33,21 @@
CouldNotUseTopic(usr)
return 1
/obj/CanUseTopic(var/mob/user, var/datum/topic_state/state)
if(user.CanUseObjTopic(src))
return ..()
user << "<span class='danger'>\icon[src]Access Denied!</span>"
return STATUS_CLOSE
/mob/living/silicon/CanUseObjTopic(var/obj/O)
return O.allowed(src)
/mob/proc/CanUseObjTopic()
return 1
/obj/proc/CouldUseTopic(var/mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
host.add_hiddenprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada

View File

@@ -210,6 +210,7 @@
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -257,11 +258,9 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
return
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!src.opened)
return

View File

@@ -7,6 +7,7 @@
var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles.
var/material/reinf_material
var/reinforcing = 0
/obj/structure/girder/displaced
icon_state = "displaced"
@@ -48,6 +49,7 @@
health = min(health,initial(health))
state = 0
icon_state = initial(icon_state)
reinforcing = 0
if(reinf_material)
reinforce_girder()
@@ -78,13 +80,18 @@
user << "<span class='notice'>You drill through the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -108,95 +115,82 @@
cover = 25
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = S.get_material()
if(!istype(M))
return ..()
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
if(reinforcing && !reinf_material)
if(!reinforce_with_material(W, user))
return ..()
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
if(!construct_wall(W, user))
return ..()
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!</span>"
else
..()
return ..()
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to construct a wall.</span>"
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M))
return 0
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return 0
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return 1
/obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
if(reinf_material)
user << "<span class='notice'>\The [src] is already reinforced.</span>"
return 0
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to reinforce the girder.</span>"
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return 0
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return 1 //don't call parent attackby() past this point
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
return 1
/obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness
health = 500
state = 2
icon_state = "reinforced"
/obj/structure/girder/verb/reinforce_with_material()
set name = "Reinforce girder"
set desc = "Reinforce a girder with metal."
set src in view(1)
var/mob/living/user = usr
if(!istype(user) || !(user.l_hand || user.r_hand))
return
if(reinf_material)
user << "\The [src] is already reinforced."
return
var/obj/item/stack/material/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
user << "You cannot plate \the [src] with that."
return
if(S.get_amount() < 2)
user << "There is not enough material here to reinforce the girder."
return
var/material/M = S.get_material()
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
reinforcing = 0
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/material/steel(get_turf(src))

View File

@@ -129,6 +129,7 @@
var/watertemp = "normal" //freezing, normal, or boiling
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
var/is_washing = 0
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
/obj/machinery/shower/New()
..()
@@ -150,7 +151,7 @@
if(on)
if (M.loc == loc)
wash(M)
check_heat(M)
process_heat(M)
for (var/atom/movable/G in src.loc)
G.clean_blood()
@@ -158,15 +159,11 @@
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50))
switch(watertemp)
if("normal")
watertemp = "freezing"
if("freezing")
watertemp = "boiling"
if("boiling")
watertemp = "normal"
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
@@ -177,8 +174,8 @@
if(on)
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
if(watertemp == "freezing")
return
if(temperature_settings[watertemp] < T20C)
return //no mist for cold water
if(!ismist)
spawn(50)
if(src && on)
@@ -200,7 +197,7 @@
wash(O)
if(ismob(O))
mobpresent += 1
check_heat(O)
process_heat(O)
/obj/machinery/shower/Uncrossed(atom/movable/O)
if(ismob(O))
@@ -304,8 +301,8 @@
if(!on) return
wash_floor()
if(!mobpresent) return
for(var/mob/living/carbon/C in loc)
check_heat(C)
for(var/mob/living/L in loc)
process_heat(L)
/obj/machinery/shower/proc/wash_floor()
if(!ismist && is_washing)
@@ -317,22 +314,19 @@
spawn(100)
is_washing = 0
/obj/machinery/shower/proc/check_heat(mob/M as mob)
if(!on || watertemp == "normal") return
if(iscarbon(M))
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
return
if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return
/obj/machinery/shower/proc/process_heat(mob/living/M)
if(!on || !istype(M)) return
var/temperature = temperature_settings[watertemp]
var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
M.bodytemperature += temp_adj
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(temperature >= H.species.heat_level_1)
H << "<span class='danger'>The water is searing hot!</span>"
else if(temperature <= H.species.cold_level_1)
H << "<span class='warning'>The water is freezing cold!</span>"
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"

View File

@@ -53,8 +53,9 @@ client/verb/JoinResponseTeam()
if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer"))
usr << "<font color=red><b>You are jobbanned from the emergency reponse team!"
return
if(ert.current_antagonists.len > 5)
if(ert.current_antagonists.len >= ert.max_antags)
usr << "The emergency response team is already full!"
return
ert.create_default(usr)
else
usr << "You need to be an observer or new player to use this."

View File

@@ -1,9 +1,9 @@
/turf/simulated/wall/vault
icon_state = "rockvault"
/turf/simulated/floor/diona
name = "biomass flooring"
icon_state = "diona"
New(location,type)
..()
icon_state = "[type]vault"
/turf/simulated/floor/diona/attackby()
return
/turf/simulated/shuttle
name = "shuttle"

View File

@@ -41,3 +41,5 @@
..(newloc,"voxalloy")
/turf/simulated/wall/voxshuttle/attackby()
return
/turf/simulated/wall/titanium/New(var/newloc)
..(newloc,"titanium")

View File

@@ -182,4 +182,4 @@ var/max_explosion_range = 14
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
var/global/obj/item/device/radio/intercom/global_announcer = new(null)
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")

View File

@@ -105,7 +105,7 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
/client/proc/everyone_random,
/client/proc/everyone_random,
/client/proc/cinematic,
/datum/admins/proc/toggle_aliens,
/datum/admins/proc/toggle_space_ninja,
@@ -114,8 +114,11 @@ var/list/admin_verbs_fun = list(
/client/proc/make_sound,
/client/proc/toggle_random_events,
/client/proc/editappear,
/client/proc/roll_dices
/client/proc/roll_dices,
/datum/admins/proc/call_supply_drop,
/datum/admins/proc/call_drop_pod
)
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_fruit,
/datum/admins/proc/spawn_custom_item,

View File

@@ -7,7 +7,7 @@
msg = sanitize(msg)
if(!msg) return
log_admin("[key_name(src)] : [msg]")
log_admin("ADMIN: [key_name(src)] : [msg]")
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
@@ -29,7 +29,7 @@
if (!msg)
return
var/sender_name = src.key
var/sender_name = key_name(usr, 1)
if(check_rights(R_ADMIN, 0))
sender_name = "<span class='admin'>[sender_name]</span>"
for(var/client/C in admins)

View File

@@ -74,7 +74,7 @@
W.access = list()
if(corpseidjob)
W.assignment = corpseidjob
W.set_owner_info(M)
M.set_id_info(W)
M.equip_to_slot_or_del(W, slot_wear_id)
qdel(src)

View File

@@ -44,7 +44,7 @@
shoes = null
return 0
H.drop_from_inventory(shoes) //Remove the old shoes so you can put on the magboots.
shoes.loc = src
shoes.forceMove(src)
if(!..())
if(shoes) //Put the old shoes back on if the check fails.
@@ -63,7 +63,7 @@
var/mob/living/carbon/human/H = wearer
if(shoes)
if(!H.equip_to_slot_if_possible(shoes, slot_shoes))
shoes.loc = get_turf(src)
shoes.forceMove(get_turf(src))
src.shoes = null
wearer = null

View File

@@ -23,7 +23,7 @@
usr << "Your module is not installed in a hardsuit."
return
module.holder.ui_interact(usr)
module.holder.ui_interact(usr, nano_state = contained_state)
/obj/item/rig_module/ai_container
@@ -46,9 +46,23 @@
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
var/obj/item/ai_verbs/verb_holder
/mob
var/get_rig_stats = 0
/obj/item/rig_module/ai_container/process()
if(integrated_ai && loc)
integrated_ai.SetupStat(loc.get_rig())
if(integrated_ai)
var/obj/item/weapon/rig/rig = get_rig()
if(rig && rig.ai_override_enabled)
integrated_ai.get_rig_stats = 1
else
integrated_ai.get_rig_stats = 0
/mob/living/Stat()
. = ..()
if(. && get_rig_stats)
var/obj/item/weapon/rig/rig = get_rig()
if(rig)
SetupStat(rig)
/obj/item/rig_module/ai_container/proc/update_verb_holder()
if(!verb_holder)
@@ -158,7 +172,10 @@
if(integrated_ai)
integrated_ai.ghostize()
qdel(integrated_ai)
if(ai_card) qdel(ai_card)
integrated_ai = null
if(ai_card)
qdel(ai_card)
ai_card = null
else if(user)
user.put_in_hands(ai_card)
else
@@ -168,7 +185,6 @@
update_verb_holder()
/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user)
if(!ai) return
// The ONLY THING all the different AI systems have in common is that they all store the mob inside an item.

View File

@@ -227,21 +227,21 @@
return 0
/mob/living/carbon/human/Stat()
..()
. = ..()
if(istype(back,/obj/item/weapon/rig))
if(. && istype(back,/obj/item/weapon/rig))
var/obj/item/weapon/rig/R = back
SetupStat(R)
/mob/proc/SetupStat(var/obj/item/weapon/rig/R)
if(src == usr && R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
if(R && !R.canremove && R.installed_modules.len && statpanel("Hardsuit Modules"))
var/cell_status = R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "ERROR"
statpanel("Hardsuit Modules", "Suit charge", cell_status)
stat("Suit charge", cell_status)
for(var/obj/item/rig_module/module in R.installed_modules)
{
for(var/stat_rig_module/SRM in module.stat_modules)
if(SRM.CanUse())
statpanel("Hardsuit Modules",SRM.module.interface_name,SRM)
stat(SRM.module.interface_name,SRM)
}
/stat_rig_module

View File

@@ -95,7 +95,7 @@
playsound(T, "sparks", 50, 1)
anim(T,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
/obj/item/rig_module/teleporter/engage(atom/target)
/obj/item/rig_module/teleporter/engage(var/atom/target, var/notify_ai)
if(!..()) return 0

View File

@@ -27,6 +27,8 @@
var/interface_path = "hardsuit.tmpl"
var/ai_interface_path = "hardsuit.tmpl"
var/interface_title = "Hardsuit Controller"
var/wearer_move_delay //Used for AI moving.
var/ai_controlled_move_delay = 10
// Keeps track of what this rig should spawn with.
var/suit_type = "hardsuit"
@@ -179,8 +181,8 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)]"
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
if(airtight)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
@@ -268,9 +270,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
canremove = !seal_target
canremove = !seal_target
if(airtight)
update_component_sealed()
update_component_sealed()
update_icon(1)
return 0
@@ -289,9 +291,9 @@
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(canremove)
piece.item_flags &= ~(STOPPRESSUREDAMAGE|AIRTIGHT)
else
else
piece.item_flags |= (STOPPRESSUREDAMAGE|AIRTIGHT)
update_icon(1)
update_icon(1)
/obj/item/weapon/rig/process()
@@ -302,7 +304,7 @@
if(istype(piece.loc, /mob/living))
M = piece.loc
M.drop_from_inventory(piece)
piece.loc = src
piece.forceMove(src)
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
if(!cell || cell.charge <= 0)
@@ -324,6 +326,8 @@
else
if(offline)
offline = 0
if(istype(wearer) && !wearer.wearing_rig)
wearer.wearing_rig = src
chest.slowdown = initial(slowdown)
if(offline)
@@ -381,8 +385,7 @@
cell.use(cost*10)
return 1
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/nano_state = inventory_state)
if(!user)
return
@@ -452,7 +455,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, 480, 550, data["ai"] ? contained_state : inventory_state)
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -541,12 +544,10 @@
return 0
/obj/item/weapon/rig/proc/notify_ai(var/message)
if(!message || !installed_modules || !installed_modules.len)
return
for(var/obj/item/rig_module/module in installed_modules)
for(var/mob/living/silicon/ai/ai in module.contents)
if(ai && ai.client && !ai.stat)
ai << "[message]"
for(var/obj/item/rig_module/ai_container/module in installed_modules)
if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat)
module.integrated_ai << "[message]"
. = 1
/obj/item/weapon/rig/equipped(mob/living/carbon/human/M)
..()
@@ -557,12 +558,13 @@
if(M && M.back == src)
M.back = null
M.drop_from_inventory(src)
src.loc = get_turf(src)
src.forceMove(get_turf(src))
return
if(istype(M) && M.back == src)
M.visible_message("<font color='blue'><b>[M] struggles into \the [src].</b></font>", "<font color='blue'><b>You struggle into \the [src].</b></font>")
wearer = M
wearer.wearing_rig = src
update_icon()
/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode)
@@ -613,22 +615,21 @@
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
use_obj.canremove = 1
holder.drop_from_inventory(use_obj)
use_obj.loc = get_turf(src)
use_obj.forceMove(get_turf(src))
use_obj.dropped()
use_obj.canremove = 0
use_obj.loc = src
use_obj.forceMove(src)
else if (deploy_mode != ONLY_RETRACT)
if(check_slot)
if(check_slot != use_obj)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
if(check_slot && check_slot == use_obj)
return
use_obj.forceMove(H)
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0, 1))
use_obj.forceMove(src)
if(check_slot)
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
else
use_obj.loc = H
if(!H.equip_to_slot_if_possible(use_obj, equip_to, 0))
use_obj.loc = src
else
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
if(piece == "helmet" && helmet)
helmet.update_light(H)
@@ -674,6 +675,7 @@
..()
for(var/piece in list("helmet","gauntlets","chest","boots"))
toggle_piece(piece, user, ONLY_RETRACT)
wearer.wearing_rig = null
wearer = null
//Todo
@@ -755,15 +757,130 @@
return 1
return 0
/*/obj/item/weapon/rig/proc/forced_move(dir)
if(locked_down)
return 0
if(!control_overridden)
return
if(!wearer || wearer.back != src)
return 0
wearer.Move(null,dir)*/
/obj/item/weapon/rig/proc/ai_can_move_suit(var/mob/user, var/check_user_module = 0, var/check_for_ai = 0)
if(check_for_ai)
if(!(locate(/obj/item/rig_module/ai_container) in contents))
return 0
var/found_ai
for(var/obj/item/rig_module/ai_container/module in contents)
if(module.damage >= 2)
continue
if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat)
found_ai = 1
break
if(!found_ai)
return 0
if(check_user_module)
if(!user || !user.loc || !user.loc.loc)
return 0
var/obj/item/rig_module/ai_container/module = user.loc.loc
if(!istype(module) || module.damage >= 2)
user << "<span class='warning'>Your host module is unable to interface with the suit.</span>"
return 0
if(offline || !cell || !cell.charge || locked_down)
if(user) user << "<span class='warning'>Your host rig is unpowered and unresponsive.</span>"
return 0
if(!wearer || wearer.back != src)
if(user) user << "<span class='warning'>Your host rig is not being worn.</span>"
return 0
if(!wearer.stat && !control_overridden && !ai_override_enabled)
if(user) user << "<span class='warning'>You are locked out of the suit servo controller.</span>"
return 0
return 1
/obj/item/weapon/rig/proc/force_rest(var/mob/user)
if(!ai_can_move_suit(user, check_user_module = 1))
return
wearer.lay_down()
user << "<span class='notice'>\The [wearer] is now [wearer.resting ? "resting" : "getting up"].</span>"
/obj/item/weapon/rig/proc/forced_move(var/direction, var/mob/user)
// Why is all this shit in client/Move()? Who knows?
if(world.time < wearer_move_delay)
return
if(!wearer || !wearer.loc || !ai_can_move_suit(user, check_user_module = 1))
return
//This is sota the goto stop mobs from moving var
if(wearer.transforming || !wearer.canmove)
return
if(locate(/obj/effect/stop/, wearer.loc))
for(var/obj/effect/stop/S in wearer.loc)
if(S.victim == wearer)
return
if(!wearer.lastarea)
wearer.lastarea = get_area(wearer.loc)
if((istype(wearer.loc, /turf/space)) || (wearer.lastarea.has_gravity == 0))
if(!wearer.Process_Spacemove(0))
return 0
if(malfunctioning)
direction = pick(cardinal)
// Inside an object, tell it we moved.
if(isobj(wearer.loc) || ismob(wearer.loc))
var/atom/O = wearer.loc
return O.relaymove(wearer, direction)
if(isturf(wearer.loc))
if(wearer.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(wearer, 1))
if(M.pulling == wearer)
if(!M.restrained() && M.stat == 0 && M.canmove && wearer.Adjacent(M))
user << "<span class='notice'>Your host is restrained! They can't move!</span>"
return 0
else
M.stop_pulling()
if(wearer.pinned.len)
src << "<span class='notice'>Your host is pinned to a wall by [wearer.pinned[1]]</span>!"
return 0
// AIs are a bit slower than regular and ignore move intent.
wearer.last_move_intent = world.time + ai_controlled_move_delay
wearer_move_delay = world.time + ai_controlled_move_delay
var/tickcomp = 0
if(config.Tickcomp)
tickcomp = ((1/(world.tick_lag))*1.3) - 1.3
wearer_move_delay += tickcomp
if(istype(wearer.buckled, /obj/vehicle))
//manually set move_delay for vehicles so we don't inherit any mob movement penalties
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
wearer_move_delay = world.time + tickcomp
return wearer.buckled.relaymove(wearer, direction)
if(istype(wearer.machine, /obj/machinery))
if(wearer.machine.relaymove(wearer, direction))
return
if(wearer.pulledby || wearer.buckled) // Wheelchair driving!
if(istype(wearer.loc, /turf/space))
return // No wheelchair driving in space
if(istype(wearer.pulledby, /obj/structure/bed/chair/wheelchair))
return wearer.pulledby.relaymove(wearer, direction)
else if(istype(wearer.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(wearer.buckled))
var/obj/item/organ/external/l_hand = wearer.get_organ("l_hand")
var/obj/item/organ/external/r_hand = wearer.get_organ("r_hand")
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck!
wearer_move_delay += 2
return wearer.buckled.relaymove(wearer,direction)
cell.use(200) //Arbitrary, TODO
wearer.Move(get_step(get_turf(wearer),direction),direction)
// This returns the rig if you are contained inside one, but not if you are wearing it
/atom/proc/get_rig()
if(loc)
return loc.get_rig()
@@ -772,6 +889,9 @@
/obj/item/weapon/rig/get_rig()
return src
/mob/living/carbon/human/get_rig()
return back
#undef ONLY_DEPLOY
#undef ONLY_RETRACT
#undef SEAL_DELAY

View File

@@ -19,7 +19,7 @@
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("Human", "Skrell", "Tajara", "Unathi")
species_restricted = list("exclude","Diona", "Xenomorph")
var/obj/machinery/camera/camera
var/list/camera_networks
@@ -64,7 +64,7 @@
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("Human", "Skrell", "Tajara", "Unathi")
species_restricted = list("exclude","Diona", "Xenomorph")
var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.

View File

@@ -112,7 +112,7 @@
if(istype(H))
if(helmet && H.head == helmet)
H.drop_from_inventory(helmet)
helmet.loc = src
helmet.forceMove(src)
if(boots)
boots.canremove = 1
@@ -120,11 +120,11 @@
if(istype(H))
if(boots && H.shoes == boots)
H.drop_from_inventory(boots)
boots.loc = src
boots.forceMove(src)
if(tank)
tank.canremove = 1
tank.loc = src
tank.forceMove(src)
/obj/item/clothing/suit/space/void/verb/toggle_helmet()
@@ -148,7 +148,7 @@
H << "<span class='notice'>You retract your suit helmet.</span>"
helmet.canremove = 1
H.drop_from_inventory(helmet)
helmet.loc = src
helmet.forceMove(src)
else
if(H.head)
H << "<span class='danger'>You cannot deploy your helmet while wearing \the [H.head].</span>"
@@ -197,15 +197,15 @@
if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead
user << "You pop \the [tank] out of \the [src]'s storage compartment."
tank.loc = get_turf(src)
tank.forceMove(get_turf(src))
src.tank = null
else if(choice == helmet)
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
helmet.loc = get_turf(src)
helmet.forceMove(get_turf(src))
src.helmet = null
else if(choice == boots)
user << "You detatch \the [boots] from \the [src]'s boot mounts."
boots.loc = get_turf(src)
boots.forceMove(get_turf(src))
src.boots = null
else
user << "\The [src] does not have anything installed."
@@ -216,7 +216,7 @@
else
user << "You attach \the [W] to \the [src]'s helmet mount."
user.drop_item()
W.loc = src
W.forceMove(src)
src.helmet = W
return
else if(istype(W,/obj/item/clothing/shoes/magboots))
@@ -225,7 +225,7 @@
else
user << "You attach \the [W] to \the [src]'s boot mounts."
user.drop_item()
W.loc = src
W.forceMove(src)
boots = W
return
else if(istype(W,/obj/item/weapon/tank))
@@ -236,7 +236,7 @@
else
user << "You insert \the [W] into \the [src]'s storage compartment."
user.drop_item()
W.loc = src
W.forceMove(src)
tank = W
return

View File

@@ -160,7 +160,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 30, list(ASSIGNMENT_ENGINEER = 5)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150), 1),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, 0, list(ASSIGNMENT_MEDICAL = 100)),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Xenobiology Breach", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENCE = 100)),
)

View File

@@ -35,7 +35,7 @@ datum/event/viral_infection/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in player_list)
if(G.stat != DEAD && G.is_client_active(5))
if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind))
var/turf/T = get_turf(G)
if(T.z in config.station_levels)
candidates += G

View File

@@ -126,7 +126,7 @@
/obj/machinery/portable_atmospherics/hydroponics/AltClick()
if(mechanical && !usr.stat && !usr.lying && Adjacent(usr))
close_lid(usr)
return
return 1
return ..()
/obj/machinery/portable_atmospherics/hydroponics/attack_ghost(var/mob/dead/observer/user)

View File

@@ -198,6 +198,12 @@
if(grown_seed.get_trait(TRAIT_TELEPORTING))
dat += "<br>The fruit is temporal/spatially unstable."
if(grown_seed.get_trait(TRAIT_EXUDE_GASSES))
dat += "<br>It will release gas into the environment."
if(grown_seed.get_trait(TRAIT_CONSUME_GASSES))
dat += "<br>It will remove gas from the environment."
if(dat)
last_data = dat
dat += "<br><br>\[<a href='?src=\ref[src];print=1'>print report</a>\]"

View File

@@ -326,6 +326,20 @@ var/list/name_to_material
icon_reinf = "reinf_over"
icon_colour = "#666666"
/material/diona
name = "biomass"
icon_colour = null
stack_type = null
integrity = 600
icon_base = "diona"
icon_reinf = "noreinf"
/material/diona/place_dismantled_product()
return
/material/diona/place_dismantled_girder(var/turf/target)
spawn_diona_nymph(target)
/material/steel/holographic
name = "holo" + DEFAULT_WALL_MATERIAL
display_name = DEFAULT_WALL_MATERIAL
@@ -346,6 +360,14 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list(DEFAULT_WALL_MATERIAL = 3750, "platinum" = 3750) //todo
/material/plasteel/titanium
name = "titanium"
stack_type = null
icon_base = "metal"
door_icon_base = "metal"
icon_colour = "#D1E6E3"
icon_reinf = "reinf_metal"
/material/glass
name = "glass"
stack_type = /obj/item/stack/material/glass

View File

@@ -74,7 +74,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
mind = body.mind //we don't transfer the mind but we keep a reference to it.
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
loc = T
forceMove(T)
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
@@ -293,7 +293,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
usr << "No area available."
usr.loc = pick(L)
usr.forceMove(pick(L))
following = null
/mob/dead/observer/verb/follow(input in getmobs())
@@ -320,7 +320,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
following = target
src << "<span class='notice'>Now following [target]</span>"
if(ismob(target))
loc = get_turf(target)
forceMove(get_turf(target))
var/mob/M = target
M.following_mobs += src
else
@@ -331,7 +331,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
break
// To stop the ghost flickering.
if(loc != T)
loc = T
forceMove(T)
sleep(15)
/mob/proc/update_following()
@@ -341,7 +341,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
following_mobs -= M
else
if(M.loc != .)
M.loc = .
M.forceMove(.)
/mob
var/list/following_mobs = list()
@@ -392,7 +392,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/turf/T = get_turf(M) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
src.loc = T
forceMove(T)
following = null
else
src << "This mob is not located in the game world."

View File

@@ -40,7 +40,7 @@
cultnet.updateVisibility(src)
/datum/antagonist/add_antagonist(var/datum/mind/player)
..()
. = ..()
if(src == cult)
cultnet.updateVisibility(player.current, 0)

View File

@@ -216,11 +216,9 @@ var/list/slot_equipment_priority = list( \
update_inv_wear_mask(0)
return
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
/mob/proc/canUnEquip(obj/item/I)
if(!I) //If there's nothing to drop, the drop is automatically successful.
return 1
var/slot
for(var/s in slot_back to slot_tie) //kind of worries me
if(get_equipped_item(s) == I)
@@ -230,6 +228,12 @@ var/list/slot_equipment_priority = list( \
if(slot && !I.mob_can_unequip(src, slot))
return 0
return 1
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
if(!(force || canUnEquip(I)))
return
drop_from_inventory(I)
return 1

View File

@@ -107,11 +107,12 @@
space_chance = 10
/datum/language/machine/get_random_name()
var/new_name
if(prob(70))
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
new_name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
else
name = pick(ai_names)
return name
new_name = pick(ai_names)
return new_name
//Syllable Lists
/*

View File

@@ -122,6 +122,13 @@
locked = 1
return
/obj/item/device/mmi/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/weapon/rig/rig = src.get_rig()
if(rig)
rig.forced_move(direction, user)
/obj/item/device/mmi/Destroy()
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc

View File

@@ -49,12 +49,12 @@
return 1
return ..()
/mob/living/carbon/brain/update_canmove()
if(in_contents_of(/obj/mecha))
if(in_contents_of(/obj/mecha) || istype(loc, /obj/item/device/mmi))
canmove = 1
use_me = 1 //If it can move, let it emote
else canmove = 0
use_me = 1
else
canmove = 0
return canmove
/mob/living/carbon/brain/binarycheck()

View File

@@ -136,8 +136,10 @@
return shock_damage
/mob/proc/swap_hand()
return
/mob/living/carbon/proc/swap_hand()
/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
if(item_in_hand) //this segment checks if the item in your hand is twohanded.
if(istype(item_in_hand,/obj/item/weapon/material/twohanded))

View File

@@ -61,11 +61,13 @@
if(!gibbed && species.death_sound)
playsound(loc, species.death_sound, 80, 1, 1)
if(ticker && ticker.mode)
sql_report_death(src)
ticker.mode.check_win()
if(wearing_rig)
wearing_rig.notify_ai("<span class='danger'>Warning: user death event. Mobility control passed to integrated intelligence system.</span>")
return ..(gibbed,species.death_message)
/mob/living/carbon/human/proc/ChangeToHusk()

View File

@@ -266,7 +266,11 @@
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] a robot [temp.name]. It has[temp.get_wounds_desc()]!</span>\n"
else if(temp.wounds.len > 0 || temp.open)
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] [T.has] [temp.get_wounds_desc()] on [T.his] [temp.name].</span><br>"
if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ])
var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ]
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.His] [parent.name].</span><br>"
else
wound_flavor_text["[temp.name]"] = "<span class='warning'>[T.He] has [temp.get_wounds_desc()] on [T.His] [temp.name].</span><br>"
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.name]"] = "<span class='danger'>[T.His] [temp.name] is bleeding!</span><br>"
else

View File

@@ -7,6 +7,7 @@
var/list/hud_list[10]
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null)
@@ -207,7 +208,7 @@
/mob/living/carbon/human/show_inv(mob/user as mob)
if(user.incapacitated())
if(user.incapacitated() || !user.Adjacent(src))
return
var/obj/item/clothing/under/suit = null
@@ -1370,6 +1371,16 @@
handle_regular_hud_updates()
/mob/living/carbon/human/Check_Shoegrip()
if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP)) //magboots + dense_object = no floating
if(shoes && (shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating
return 1
return 0
/mob/living/carbon/human/can_stand_overridden()
if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1))
// Actually missing a leg will screw you up. Everything else can be compensated for.
for(var/limbcheck in list("l_leg","r_leg"))
var/obj/item/organ/affecting = get_organ(limbcheck)
if(!affecting)
return 0
return 1
return 0

View File

@@ -32,7 +32,6 @@
var/obj/item/organ/brain/sponge = internal_organs_by_name["brain"]
if(sponge)
sponge.take_damage(amount)
sponge.damage = min(max(sponge.damage, 0),(maxHealth*2))
brainloss = sponge.damage
else
brainloss = 200
@@ -145,6 +144,9 @@
/mob/living/carbon/human/Paralyse(amount)
if(HULK in mutations) return
// Notify our AI if they can now control the suit.
if(wearing_rig && !stat && paralysis < amount) //We are passing out right this second.
wearing_rig.notify_ai("<span class='danger'>Warning: user consciousness failure. Mobility control passed to integrated intelligence system.</span>")
..()
/mob/living/carbon/human/getCloneLoss()

View File

@@ -52,6 +52,10 @@
// update the current life tick, can be used to e.g. only do something every 4 ticks
life_tick++
// This is not an ideal place for this but it will do for now.
if(wearing_rig && wearing_rig.offline)
wearing_rig = null
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
if(in_stasis) loc:used++
@@ -933,13 +937,10 @@
silent = 0
return 1
//UNCONSCIOUS. NO-ONE IS HOME
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
Paralyse(3)
//UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > 50) || (health <= config.health_threshold_crit))
Paralyse(3)
if(hallucination)
if(hallucination >= 20)
if(prob(3))
@@ -956,30 +957,28 @@
for(var/atom/a in hallucinations)
qdel(a)
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
if(halloss > 100)
src << "<span class='notice'>You're in too much pain to keep going...</span>"
src.visible_message("<B>[src]</B> slumps to the ground, too weak to continue fighting.")
Paralyse(10)
setHalLoss(99)
if(paralysis)
AdjustParalysis(-1)
if(paralysis || sleeping)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if(halloss > 0)
adjustHalLoss(-3)
adjustHalLoss(-3)
if(paralysis)
AdjustParalysis(-1)
else if(sleeping)
speech_problem_flag = 1
handle_dreams()
adjustHalLoss(-3)
if (mind)
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
if(client || sleeping > 3)
AdjustSleeping(-1)
blinded = 1
stat = UNCONSCIOUS
animate_tail_reset()
if( prob(2) && health && !hal_crit )
spawn(0)
emote("snore")

View File

@@ -162,10 +162,11 @@
/mob/living/carbon/human/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1))
I.talk_into(src, message, verb, speaking)
I.add_fingerprint(src)
used_radios += I
if(!src.restrained())
for(var/obj/item/device/radio/intercom/I in view(1))
I.talk_into(src, message, null, verb, speaking)
I.add_fingerprint(src)
used_radios += I
if("headset")
if(l_ear && istype(l_ear,/obj/item/device/radio))
var/obj/item/device/radio/R = l_ear

View File

@@ -26,6 +26,7 @@
cold_level_3 = 0
eyes = "vox_eyes_s"
gluttonous = 2
breath_type = "nitrogen"
poison_type = "oxygen"

View File

@@ -108,7 +108,7 @@
var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys.
var/gluttonous // Can eat some mobs. 1 for monkeys, 2 for people.
var/gluttonous // Can eat some mobs. 1 for mice, 2 for monkeys, 3 for people.
var/rarity_value = 1 // Relative rarity/collector value for this species.
// Determines the organs that the species spawns with and
var/list/has_organ = list( // which required-organ checks are conducted.
@@ -155,6 +155,11 @@
for(var/u_type in unarmed_types)
unarmed_attacks += new u_type()
if(gluttonous)
if(!inherent_verbs)
inherent_verbs = list()
inherent_verbs |= /mob/living/carbon/human/proc/regurgitate
/datum/species/proc/get_station_variant()
return name

View File

@@ -2,7 +2,6 @@
attack_verb = list("bit", "chomped on")
attack_sound = 'sound/weapons/bite.ogg'
shredding = 0
damage = 5
sharp = 1
edge = 1
@@ -11,7 +10,6 @@
attack_noun = list("tendril")
eye_attack_text = "a tendril"
eye_attack_text_victim = "a tendril"
damage = 5
/datum/unarmed_attack/claws
attack_verb = list("scratched", "clawed", "slashed")
@@ -20,7 +18,6 @@
eye_attack_text_victim = "sharp claws"
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
damage = 5
sharp = 1
edge = 1
@@ -57,18 +54,18 @@
/datum/unarmed_attack/claws/strong
attack_verb = list("slashed")
damage = 10
damage = 5
shredding = 1
/datum/unarmed_attack/bite/strong
attack_verb = list("mauled")
damage = 15
damage = 8
shredding = 1
/datum/unarmed_attack/slime_glomp
attack_verb = list("glomped")
attack_noun = list("body")
damage = 0
damage = 2
/datum/unarmed_attack/slime_glomp/apply_effects()
//Todo, maybe have a chance of causing an electrical shock?

View File

@@ -25,6 +25,8 @@
primitive_form = "Stok"
darksight = 3
gluttonous = 1
slowdown = 0.5
brute_mod = 0.8
num_alternate_languages = 2
secondary_langs = list("Sinta'unathi")
@@ -42,7 +44,7 @@
heat_level_2 = 480 //Default 400
heat_level_3 = 1100 //Default 1000
spawn_flags = CAN_JOIN | IS_WHITELISTED
spawn_flags = CAN_JOIN | IS_WHITELISTED
appearance_flags = HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
flesh_color = "#34AF10"
@@ -77,8 +79,10 @@
tail_animation = 'icons/mob/species/tajaran/tail.dmi'
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
darksight = 8
slowdown = -1
brute_mod = 1.2
slowdown = -0.5
brute_mod = 1.15
burn_mod = 1.15
gluttonous = 1
num_alternate_languages = 2
secondary_langs = list("Siik'tajr")
@@ -90,7 +94,7 @@
cold_level_1 = 200 //Default 260
cold_level_2 = 140 //Default 200
cold_level_3 = 80 //Default 120
cold_level_3 = 80 //Default 120
heat_level_1 = 330 //Default 360
heat_level_2 = 380 //Default 400

View File

@@ -11,7 +11,7 @@
has_fine_manipulation = 0
siemens_coefficient = 0
gluttonous = 2
gluttonous = 3
eyes = "blank_eyes"

View File

@@ -3,7 +3,7 @@
if(!slot_to_strip || !istype(user))
return
if(user.incapacitated())
if(user.incapacitated() || !user.Adjacent(src))
user << browse(null, text("window=mob[src.name]"))
return

View File

@@ -208,7 +208,7 @@ var/global/list/damage_icon_parts = list()
O.update_icon()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.get_bodytype()]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels

View File

@@ -657,7 +657,27 @@ default behaviour is:
set category = "IC"
resting = !resting
src << "\blue You are now [resting ? "resting" : "getting up"]"
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"].</span>"
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(istype(carried_item, /obj/item/weapon/implant))
return 1
if(istype(carried_item, /obj/item/clothing/mask/facehugger))
return 1
return 0
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in internal_organs)
return 1
return ..()
/mob/living/carbon/human/is_allowed_vent_crawl_item(var/obj/item/carried_item)
if(carried_item in organs)
return 1
return ..()
/mob/living/simple_animal/spiderbot/is_allowed_vent_crawl_item(var/obj/item/carried_item)
return carried_item != held_item
/mob/living/proc/handle_ventcrawl(var/obj/machinery/atmospherics/unary/vent_pump/vent_found = null, var/ignore_items = 0) // -- TLE -- Merged by Carn
if(stat)
@@ -721,9 +741,10 @@ default behaviour is:
if(!ignore_items)
for(var/obj/item/carried_item in contents)//If the monkey got on objects.
if( !istype(carried_item, /obj/item/weapon/implant) && !istype(carried_item, /obj/item/clothing/mask/facehugger) )//If it's not an implant or a facehugger
src << "\red You can't be carrying items or have items equipped when vent crawling!"
return
if(is_allowed_vent_crawl_item(carried_item))
continue
src << "<span class='warning'>You can't be carrying items or have items equipped when vent crawling!</span>"
return
if(isslime(src))
var/mob/living/carbon/slime/S = src

View File

@@ -81,7 +81,7 @@ var/list/ai_verbs_default = list(
var/datum/ai_icon/selected_sprite // The selected icon set
var/custom_sprite = 0 // Whether the selected icon is custom
var/carded
/mob/living/silicon/ai/proc/add_ai_verbs()
src.verbs |= ai_verbs_default
@@ -370,7 +370,7 @@ var/list/ai_verbs_default = list(
if(emergency_message_cooldown)
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
return
var/input = input(usr, "Please choose a message to transmit to [boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to [boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input)
return
Centcomm_announce(input, usr)
@@ -684,5 +684,15 @@ var/list/ai_verbs_default = list(
icon_state = selected_sprite.alive_icon
set_light(1, 1, selected_sprite.alive_light)
// Pass lying down or getting up to our pet human, if we're in a rig.
/mob/living/silicon/ai/lay_down()
set name = "Rest"
set category = "IC"
resting = 0
var/obj/item/weapon/rig/rig = src.get_rig()
if(rig)
rig.force_rest(src)
#undef AI_CHECK_WIRELESS
#undef AI_CHECK_RADIO

View File

@@ -72,8 +72,6 @@
var/current_pda_messaging = null
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
canmove = 0
src.loc = paicard
card = paicard
sradio = new(src)
@@ -276,8 +274,6 @@
var/obj/item/device/pda/holder = card.loc
holder.pai = null
canmove = 1
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = src
src.forceMove(get_turf(card))
@@ -339,12 +335,16 @@
set name = "Rest"
set category = "IC"
// Pass lying down or getting up to our pet human, if we're in a rig.
if(istype(src.loc,/obj/item/device/paicard))
resting = 0
var/obj/item/weapon/rig/rig = src.get_rig()
if(istype(rig))
rig.force_rest(src)
else
resting = !resting
icon_state = resting ? "[chassis]_rest" : "[chassis]"
src << "\blue You are now [resting ? "resting" : "getting up"]"
src << "<span class='notice'>You are now [resting ? "resting" : "getting up"]</span>"
canmove = !resting
@@ -393,7 +393,8 @@
card.loc = get_turf(card)
src.forceMove(card)
card.forceMove(card.loc)
canmove = 0
canmove = 1
resting = 0
icon_state = "[chassis]"
/mob/living/silicon/pai/start_pulling(var/atom/movable/AM)

View File

@@ -87,6 +87,9 @@
/obj/item/weapon/gripper/no_use //Used when you want to hold and put items in other things, but not able to 'use' the item
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/no_use/loader //This is used to disallow building with metal.
name = "sheet loader"
desc = "A specialized loading device, designed to pick up and insert sheets of materials inside machines."
@@ -101,9 +104,6 @@
return wrapped.attack_self(user)
return ..()
/obj/item/weapon/gripper/no_use/attack_self(mob/user as mob)
return
/obj/item/weapon/gripper/verb/drop_item()
set name = "Drop Item"
@@ -130,6 +130,8 @@
force_holder = wrapped.force
wrapped.force = 0.0
wrapped.attack(M,user)
if(deleted(wrapped))
wrapped = null
return 1
return 0

View File

@@ -5,4 +5,6 @@
winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
return
// Forces synths to select an icon relevant to their module
if(!icon_selected)
choose_icon(icon_selection_tries, module_sprites)

View File

@@ -24,8 +24,10 @@
//Icon stuff
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/icontype //Persistent icontype tracking allows for cleaner icon updates
var/module_sprites[0] //Used to store the associations between sprite names and sprite index.
var/icon_selected = 1 //If icon selection has been completed yet
var/icon_selection_tries = 0//Remaining attempts to select icon before a selection is forced
//Hud stuff
@@ -89,21 +91,6 @@
/mob/living/silicon/robot/proc/robot_checklaws
)
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
..()
/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)
@@ -178,17 +165,6 @@
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
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/SetName(pickedName as text)
custom_name = pickedName
updatename()
@@ -241,10 +217,15 @@
..()
/mob/living/silicon/robot/proc/set_module_sprites(var/list/new_sprites)
module_sprites = new_sprites
module_sprites = new_sprites.Copy()
//Custom_sprite check and entry
if (custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[modtype]"
icontype = "Custom"
else
icontype = module_sprites[1]
icon_state = module_sprites[icontype]
updateicon()
return module_sprites
/mob/living/silicon/robot/proc/pick_module()
@@ -255,7 +236,7 @@
if((crisis && security_level == SEC_LEVEL_RED) || crisis_override) //Leaving this in until it's balanced appropriately.
src << "\red Crisis mode active. Combat module available."
modules+="Combat"
modtype = input("Please, select a module!", "Robot", null, null) in modules
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
if(module)
return
@@ -268,8 +249,6 @@
hands.icon_state = lowertext(modtype)
feedback_inc("cyborg_[lowertext(modtype)]",1)
updatename()
set_module_sprites(module.sprites)
choose_icon(module_sprites.len + 1, module_sprites)
notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name)
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
@@ -688,7 +667,7 @@
/mob/living/silicon/robot/updateicon()
overlays.Cut()
if(stat == 0)
if(stat == CONSCIOUS)
overlays += "eyes-[module_sprites[icontype]]"
if(opened)
@@ -916,38 +895,30 @@
return
/mob/living/silicon/robot/proc/choose_icon(var/triesleft, var/list/module_sprites)
if(triesleft<1 || !module_sprites.len)
return
else
triesleft--
if (custom_sprite == 1)
icontype = "Custom"
triesleft = 0
else if(module_sprites.len == 1)
icontype = module_sprites[1]
else
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
if(icontype)
icon_state = module_sprites[icontype]
else
if(!module_sprites.len)
src << "Something is badly wrong with the sprite selection. Harass a coder."
icon_state = module_sprites[1]
return
icon_selected = 0
src.icon_selection_tries = triesleft
if(module_sprites.len == 1 || !client)
if(!(icontype in module_sprites))
icontype = module_sprites[1]
else
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chance\s." : "This is your last try."]", "Robot", icontype, null) in module_sprites
icon_state = module_sprites[icontype]
updateicon()
if (triesleft >= 1)
if (module_sprites.len > 1 && triesleft >= 1 && client)
icon_selection_tries--
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
choose_icon(icon_selection_tries, module_sprites)
return
else
triesleft = 0
return
else
src << "Your icon has been set. You now require a module reset to change it."
icon_selected = 1
icon_selection_tries = 0
src << "Your icon has been set. You now require a module reset to change it."
/mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs
set name = "Set Sensor Augmentation"

View File

@@ -105,13 +105,6 @@
desc = "A circuit grafted onto the bottom of an ID card. It is used to transmit access codes into other robot chassis, \
allowing you to lock and unlock other robots' panels."
/obj/item/weapon/card/id/robot/attack_self() //override so borgs can't flash their IDs.
return
/obj/item/weapon/card/id/robot/read()
usr << "The ID card does not appear to have any writing on it."
return
//A harvest item for serviceborgs.
/obj/item/weapon/robot_harvester
name = "auto harvester"

View File

@@ -49,9 +49,13 @@ var/global/list/robot_modules = list(
if(R.radio)
R.radio.recalculateChannels()
/obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
R.module = null
R.set_module_sprites(sprites)
R.choose_icon(R.module_sprites.len + 1, R.module_sprites)
for(var/obj/item/I in modules)
I.canremove = 0
/obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R)
remove_camera_networks(R)
remove_languages(R)
remove_subsystems(R)
@@ -59,16 +63,17 @@ var/global/list/robot_modules = list(
if(R.radio)
R.radio.recalculateChannels()
qdel(src)
R.choose_icon(0, R.set_module_sprites(list("Default" = "robot")))
/obj/item/weapon/robot_module/Destroy()
qdel(modules)
qdel(synths)
for(var/module in modules)
qdel(module)
for(var/synth in synths)
qdel(synths)
modules.Cut()
synths.Cut()
qdel(emag)
qdel(jetpack)
modules = null
synths = null
emag = null
jetpack = null
return ..()
@@ -144,7 +149,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/standard/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -152,7 +156,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.emag = new /obj/item/weapon/melee/energy/sword(src)
return
..()
/obj/item/weapon/robot_module/medical
name = "medical robot module"
@@ -172,7 +176,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/medical/surgeon/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/device/healthanalyzer(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/surgeon(src)
@@ -204,7 +207,7 @@ var/global/list/robot_modules = list(
src.modules += N
src.modules += B
return
..()
/obj/item/weapon/robot_module/medical/surgeon/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
if(src.emag)
@@ -224,7 +227,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/medical/crisis/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
@@ -258,7 +260,7 @@ var/global/list/robot_modules = list(
src.modules += B
src.modules += S
return
..()
/obj/item/weapon/robot_module/medical/crisis/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
@@ -294,7 +296,6 @@ var/global/list/robot_modules = list(
no_slip = 1
/obj/item/weapon/robot_module/engineering/construction/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -328,8 +329,9 @@ var/global/list/robot_modules = list(
RG.synths = list(metal, glass)
src.modules += RG
/obj/item/weapon/robot_module/engineering/general/New()
..()
/obj/item/weapon/robot_module/engineering/general/New()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/extinguisher(src)
@@ -382,7 +384,7 @@ var/global/list/robot_modules = list(
RG.synths = list(metal, glass)
src.modules += RG
return
..()
/obj/item/weapon/robot_module/security
name = "security robot module"
@@ -403,7 +405,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/security/general/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/hud/sec(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
@@ -411,7 +412,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/gun/energy/taser/mounted/cyborg(src)
src.modules += new /obj/item/taperoll/police(src)
src.emag = new /obj/item/weapon/gun/energy/laser/mounted(src)
return
..()
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/flash/F = locate() in src.modules
@@ -442,7 +443,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/janitor/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/storage/bag/trash(src)
@@ -451,7 +451,7 @@ var/global/list/robot_modules = list(
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
src.emag.reagents.add_reagent("lube", 250)
src.emag.name = "Lube spray"
return
..()
/obj/item/weapon/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules
@@ -485,7 +485,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/clerical/butler/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/gripper/service(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
@@ -507,14 +506,14 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/weapon/tray/robotray(src)
src.modules += new /obj/item/weapon/reagent_containers/borghypo/service(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src)
var/datum/reagents/R = new/datum/reagents(50)
src.emag.reagents = R
R.my_atom = src.emag
R.add_reagent("beer2", 50)
src.emag.name = "Mickey Finn's Special Brew"
return
..()
/obj/item/weapon/robot_module/clerical/general
name = "clerical robot module"
@@ -528,13 +527,13 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/clerical/general/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/pen/robopen(src)
src.modules += new /obj/item/weapon/form_printer(src)
src.modules += new /obj/item/weapon/gripper/paperwork(src)
src.modules += new /obj/item/weapon/hand_labeler(src)
src.emag = new /obj/item/weapon/stamp/denied(src)
..()
/obj/item/weapon/robot_module/general/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
@@ -556,7 +555,6 @@ var/global/list/robot_modules = list(
supported_upgrades = list(/obj/item/borg/upgrade/jetpack)
/obj/item/weapon/robot_module/miner/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -568,7 +566,7 @@ var/global/list/robot_modules = list(
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/research
name = "research module"
@@ -579,7 +577,6 @@ var/global/list/robot_modules = list(
)
/obj/item/weapon/robot_module/research/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/portable_destructive_analyzer(src)
src.modules += new /obj/item/weapon/gripper/research(src)
@@ -605,7 +602,7 @@ var/global/list/robot_modules = list(
N.synths = list(nanite)
src.modules += N
return
..()
/obj/item/weapon/robot_module/syndicate
name = "illegal robot module"
@@ -617,9 +614,12 @@ var/global/list/robot_modules = list(
LANGUAGE_SKRELLIAN = 0,
LANGUAGE_GUTTER = 1
)
sprites = list(
"Dread" = "securityrobot",
)
var/id
/obj/item/weapon/robot_module/syndicate/New(var/mob/living/silicon/robot/R)
..()
loc = R
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/weapon/melee/energy/sword(src)
@@ -628,14 +628,21 @@ var/global/list/robot_modules = list(
var/jetpack = new/obj/item/weapon/tank/jetpack/carbondioxide(src)
src.modules += jetpack
R.internals = jetpack
return
id = R.idcard
src.modules += id
..()
/obj/item/weapon/robot_module/syndicate/Destroy()
src.modules -= id
id = null
return ..()
/obj/item/weapon/robot_module/security/combat
name = "combat robot module"
sprites = list("Combat Android" = "droid-combat")
/obj/item/weapon/robot_module/combat/New()
..()
src.modules += new /obj/item/device/flash(src)
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/gun/energy/laser/mounted(src)
@@ -643,7 +650,7 @@ var/global/list/robot_modules = list(
src.modules += new /obj/item/borg/combat/shield(src)
src.modules += new /obj/item/borg/combat/mobility(src)
src.emag = new /obj/item/weapon/gun/energy/lasercannon/mounted(src)
return
..()
/obj/item/weapon/robot_module/drone
name = "drone module"
@@ -651,7 +658,6 @@ var/global/list/robot_modules = list(
networks = list(NETWORK_ENGINEERING)
/obj/item/weapon/robot_module/drone/New()
..()
src.modules += new /obj/item/weapon/weldingtool(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
@@ -718,14 +724,16 @@ var/global/list/robot_modules = list(
P.synths = list(plastic)
src.modules += P
..()
/obj/item/weapon/robot_module/drone/construction
name = "construction drone module"
channels = list("Engineering" = 1)
languages = list()
/obj/item/weapon/robot_module/drone/construction/New()
..()
src.modules += new /obj/item/weapon/rcd/borg(src)
..()
/obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
var/obj/item/device/lightreplacer/LR = locate() in src.modules

View File

@@ -0,0 +1,28 @@
/mob/living/silicon/robot/syndicate
lawupdate = 0
scrambledcodes = 1
icon_state = "securityrobot"
modtype = "Security"
lawchannel = "State"
idcard_type = /obj/item/weapon/card/id/syndicate
/mob/living/silicon/robot/syndicate/New()
if(!cell)
cell = new /obj/item/weapon/cell(src)
cell.maxcharge = 25000
cell.charge = 25000
..()
/mob/living/silicon/robot/syndicate/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
laws = new /datum/ai_laws/syndicate_override
overlays.Cut()
init_id()
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)

View File

@@ -23,6 +23,10 @@
var/next_alarm_notice
var/list/datum/alarm/queued_alarms = new()
var/list/access_rights
var/obj/item/weapon/card/id/idcard
var/idcard_type = /obj/item/weapon/card/id/synthetic
#define SEC_HUD 1 //Security HUD mode
#define MED_HUD 2 //Medical HUD mode
@@ -30,6 +34,7 @@
silicon_mob_list |= src
..()
add_language("Galactic Common")
init_id()
init_subsystems()
/mob/living/silicon/Destroy()
@@ -38,6 +43,12 @@
AH.unregister(src)
..()
/mob/living/silicon/proc/init_id()
if(idcard)
return
idcard = new idcard_type(src)
set_id_info(idcard)
/mob/living/silicon/proc/SetName(pickedName as text)
real_name = pickedName
name = real_name

Some files were not shown because too many files have changed in this diff Show More