mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Master to dev merge.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
/mob/living/carbon/human/RangedAttack(var/atom/A)
|
||||
if(!gloves && !mutations.len) return
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if((LASER in mutations) && a_intent == "harm")
|
||||
if((LASER in mutations) && a_intent == "hurt")
|
||||
LaserEyes(A) // moved into a proc below
|
||||
|
||||
else if(istype(G) && G.Touch(A,0)) // for magic gloves
|
||||
|
||||
@@ -101,7 +101,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.SetLuminosity(2) //hologram lighting
|
||||
SetLuminosity(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
A.current = src
|
||||
A.holo = src
|
||||
master = A//AI is the master.
|
||||
use_power = 2//Active power usage.
|
||||
return 1
|
||||
@@ -109,8 +109,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
/obj/machinery/hologram/holopad/proc/clear_holo()
|
||||
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
|
||||
del(hologram)//Get rid of hologram.
|
||||
if(master.current == src)
|
||||
master.current = null
|
||||
if(master.holo == src)
|
||||
master.holo = null
|
||||
master = null//Null the master, since no-one is using it now.
|
||||
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||
icon_state = "holopad0"
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
break
|
||||
if(istype (M, /mob/dead/observer))
|
||||
continue
|
||||
if(M.buckled)
|
||||
if(M.buckled || M.pinned.len)
|
||||
continue
|
||||
|
||||
if(M.client)
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
if (istype(M, /mob/living/carbon/slime))
|
||||
|
||||
@@ -1212,6 +1212,8 @@ datum/preferences
|
||||
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facialhairstyles
|
||||
if(new_f_style)
|
||||
f_style = new_f_style
|
||||
if(organ_data[third_limb] == "amputated")
|
||||
organ_data[third_limb] = null
|
||||
|
||||
if("underwear")
|
||||
var/list/underwear_options
|
||||
|
||||
@@ -1631,26 +1631,19 @@
|
||||
if(status_flags & FAKEDEATH)
|
||||
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
|
||||
|
||||
//handles different chems' influence on pulse
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
|
||||
temp--
|
||||
break //one reagent is enough
|
||||
//comment out the breaks to make med effects stack
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
|
||||
if(R.id in tachycardics)
|
||||
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
|
||||
temp++
|
||||
break
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //To avoid using fakedeath
|
||||
if(R.id in heartstopper)
|
||||
if(R.id in heartstopper) //To avoid using fakedeath
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //Conditional heart-stoppage
|
||||
if(R.id in cheartstopper)
|
||||
if(R.id in cheartstopper) //Conditional heart-stoppage
|
||||
if(R.volume >= R.overdose)
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
|
||||
return temp
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/list/ai_verbs_default = list(
|
||||
density = 1
|
||||
status_flags = CANSTUN|CANPARALYSE
|
||||
var/list/network = list("SS13")
|
||||
var/obj/machinery/camera/current = null
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/list/connected_robots = list()
|
||||
var/aiRestorePowerRoutine = 0
|
||||
//var/list/laws = list()
|
||||
@@ -374,9 +374,9 @@ var/list/ai_verbs_default = list(
|
||||
cancel_call_proc(src)
|
||||
|
||||
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
|
||||
if (!current)
|
||||
if (!camera)
|
||||
return null
|
||||
user.reset_view(current)
|
||||
user.reset_view(camera)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
@@ -560,10 +560,10 @@ var/list/ai_verbs_default = list(
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
if(current)
|
||||
current.SetLuminosity(0)
|
||||
if(camera)
|
||||
camera.SetLuminosity(0)
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
current = A
|
||||
camera = A
|
||||
..()
|
||||
if(istype(A,/obj/machinery/camera))
|
||||
if(camera_light_on) A.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
@@ -752,9 +752,9 @@ var/list/ai_verbs_default = list(
|
||||
camera_light_on = !camera_light_on
|
||||
src << "Camera lights [camera_light_on ? "activated" : "deactivated"]."
|
||||
if(!camera_light_on)
|
||||
if(current)
|
||||
current.SetLuminosity(0)
|
||||
current = null
|
||||
if(camera)
|
||||
camera.SetLuminosity(0)
|
||||
camera = null
|
||||
else
|
||||
lightNearbyCamera()
|
||||
|
||||
@@ -765,23 +765,23 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/proc/lightNearbyCamera()
|
||||
if(camera_light_on && camera_light_on < world.timeofday)
|
||||
if(src.current)
|
||||
if(src.camera)
|
||||
var/obj/machinery/camera/camera = near_range_camera(src.eyeobj)
|
||||
if(camera && src.current != camera)
|
||||
src.current.SetLuminosity(0)
|
||||
if(camera && src.camera != camera)
|
||||
src.camera.SetLuminosity(0)
|
||||
if(!camera.light_disabled)
|
||||
src.current = camera
|
||||
src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
src.camera = camera
|
||||
src.camera.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
else
|
||||
src.current = null
|
||||
src.camera = null
|
||||
else if(isnull(camera))
|
||||
src.current.SetLuminosity(0)
|
||||
src.current = null
|
||||
src.camera.SetLuminosity(0)
|
||||
src.camera = null
|
||||
else
|
||||
var/obj/machinery/camera/camera = near_range_camera(src.eyeobj)
|
||||
if(camera && !camera.light_disabled)
|
||||
src.current = camera
|
||||
src.current.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
src.camera = camera
|
||||
src.camera.SetLuminosity(AI_CAMERA_LUMINOSITY)
|
||||
camera_light_on = world.timeofday + 1 * 20 // Update the light every 2 seconds.
|
||||
|
||||
|
||||
|
||||
@@ -47,9 +47,8 @@
|
||||
if(ai.client)
|
||||
ai.client.eye = src
|
||||
//Holopad
|
||||
if(istype(ai.current, /obj/machinery/hologram/holopad))
|
||||
var/obj/machinery/hologram/holopad/H = ai.current
|
||||
H.move_hologram()
|
||||
if(ai.holo)
|
||||
ai.holo.move_hologram()
|
||||
|
||||
/mob/aiEye/proc/getLoc()
|
||||
|
||||
@@ -67,7 +66,7 @@
|
||||
var/sprint = 10
|
||||
var/cooldown = 0
|
||||
var/acceleration = 1
|
||||
|
||||
var/obj/machinery/hologram/holopad/holo = null
|
||||
|
||||
// Intiliaze the eye by assigning it's "ai" variable to us. Then set it's loc to us.
|
||||
/mob/living/silicon/ai/New()
|
||||
@@ -127,8 +126,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/view_core()
|
||||
|
||||
current = null
|
||||
camera = null
|
||||
cameraFollow = null
|
||||
unset_machine()
|
||||
|
||||
|
||||
@@ -153,8 +153,8 @@
|
||||
if (!message)
|
||||
return
|
||||
|
||||
var/obj/machinery/hologram/holopad/T = src.current
|
||||
if(istype(T) && T.hologram && T.master == src)//If there is a hologram and its master is the user.
|
||||
var/obj/machinery/hologram/holopad/T = src.holo
|
||||
if(T && T.hologram && T.master == src)//If there is a hologram and its master is the user.
|
||||
var/verb = say_quote(message)
|
||||
|
||||
//Human-like, sorta, heard by those who understand humans.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
max_n2 = 0
|
||||
minbodytemp = 0
|
||||
|
||||
break_stuff_probability = 2
|
||||
break_stuff_probability = 15
|
||||
|
||||
faction = "carp"
|
||||
|
||||
|
||||
@@ -193,6 +193,10 @@
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
if(prob(break_stuff_probability))
|
||||
for(var/dir in cardinal) // North, South, East, West
|
||||
for(var/obj/structure/window/obstacle in get_step(src, dir))
|
||||
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
|
||||
obstacle.attack_animal(src)
|
||||
return
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_animal(src)
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
|
||||
/obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
var/dist
|
||||
if(istype(user) && user.current) //is AI
|
||||
dist = get_dist(src, user.current)
|
||||
if(istype(user) && user.camera) //is AI
|
||||
dist = get_dist(src, user.camera)
|
||||
else //cyborg or AI not seeing through a camera
|
||||
dist = get_dist(src, user)
|
||||
if(dist < 2)
|
||||
|
||||
@@ -344,7 +344,6 @@
|
||||
/obj/machinery/power/smes/proc/ion_act()
|
||||
if(src.z == 1)
|
||||
if(prob(1)) //explosion
|
||||
world << "\red SMES explosion in [src.loc.loc]"
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
|
||||
sleep(10*pick(4,5,6,7,10,14))
|
||||
@@ -356,7 +355,6 @@
|
||||
del(src)
|
||||
return
|
||||
if(prob(15)) //Power drain
|
||||
world << "\red SMES power drain in [src.loc.loc]"
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
@@ -365,7 +363,6 @@
|
||||
else
|
||||
emp_act(2)
|
||||
if(prob(5)) //smoke only
|
||||
world << "\red SMES smoke in [src.loc.loc]"
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
|
||||
@@ -14,15 +14,13 @@
|
||||
var/energy = 100
|
||||
var/max_energy = 100
|
||||
var/amount = 30
|
||||
var/accept_glass = 0
|
||||
var/accept_glass = 0 //At 0 ONLY accepts glass containers. Kinda misleading varname.
|
||||
var/beaker = null
|
||||
var/recharged = 0
|
||||
var/hackedcheck = 0
|
||||
var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine",
|
||||
"sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron",
|
||||
"copper","mercury","radium","water","ethanol","sugar","sacid","tungsten")
|
||||
var/list/broken_requirements = list()
|
||||
var/broken_on_spawn = 0
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/recharge()
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
@@ -38,7 +36,6 @@
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
|
||||
/obj/machinery/chem_dispenser/process()
|
||||
|
||||
if(recharged <= 0)
|
||||
recharge()
|
||||
recharged = 15
|
||||
@@ -50,27 +47,6 @@
|
||||
recharge()
|
||||
dispensable_reagents = sortList(dispensable_reagents)
|
||||
|
||||
if(broken_on_spawn)
|
||||
var/amount = pick(1,2,2,3,4)
|
||||
var/list/options = list()
|
||||
options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it."
|
||||
options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it."
|
||||
options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it."
|
||||
options[/obj/item/weapon/stock_parts/matter_bin/adv] = "Give it an advanced matter bin to fix it."
|
||||
options[/obj/item/stack/sheet/mineral/diamond] = "Line up a cut diamond with the nozzle to fix it."
|
||||
options[/obj/item/stack/sheet/mineral/uranium] = "Position a uranium sheet inside to fix it."
|
||||
options[/obj/item/stack/sheet/mineral/phoron] = "Enter a block of phoron to fix it."
|
||||
options[/obj/item/stack/sheet/mineral/silver] = "Cover the internals with a silver lining to fix it."
|
||||
options[/obj/item/stack/sheet/mineral/gold] = "Wire a golden filament to fix it."
|
||||
options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it."
|
||||
options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it."
|
||||
stat |= BROKEN
|
||||
while(amount > 0)
|
||||
amount -= 1
|
||||
|
||||
var/index = pick(options)
|
||||
broken_requirements[index] = options[index]
|
||||
options -= index
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -101,9 +77,6 @@
|
||||
* @return nothing
|
||||
*/
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main",var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(broken_requirements.len)
|
||||
user << "<span class='warning'>[src] is broken. [broken_requirements[broken_requirements[1]]]</span>"
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(user.stat || user.restrained()) return
|
||||
|
||||
@@ -179,19 +152,6 @@
|
||||
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/B as obj, var/mob/user as mob)
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(broken_requirements.len && B.type == broken_requirements[1])
|
||||
broken_requirements -= broken_requirements[1]
|
||||
user << "<span class='notice'>You fix [src].</span>"
|
||||
if(istype(B,/obj/item/stack))
|
||||
var/obj/item/stack/S = B
|
||||
S.use(1)
|
||||
else
|
||||
user.drop_item()
|
||||
del(B)
|
||||
if(broken_requirements.len==0)
|
||||
stat ^= BROKEN
|
||||
return
|
||||
if(src.beaker)
|
||||
user << "Something is already loaded into the machine."
|
||||
return
|
||||
@@ -214,7 +174,6 @@
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/soda
|
||||
@@ -241,6 +200,7 @@
|
||||
dispensable_reagents -= list("thirteenloko")
|
||||
hackedcheck = 0
|
||||
return
|
||||
|
||||
/obj/machinery/chem_dispenser/beer
|
||||
icon_state = "booze_dispenser"
|
||||
name = "booze dispenser"
|
||||
|
||||
@@ -130,7 +130,7 @@ datum
|
||||
water //I can't believe we never had this.
|
||||
name = "Water"
|
||||
id = "water"
|
||||
result = null
|
||||
result = "water"
|
||||
required_reagents = list("oxygen" = 2, "hydrogen" = 1)
|
||||
result_amount = 1
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
//Display an attack message.
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(target != user) O.show_message(text("\red <B>[target] has been hit over the head with a bottle of [src.name], by [user]!</B>"), 1)
|
||||
else O.show_message(text("\red <B>[target] hit himself with a bottle of [src.name] on the head!</B>"), 1)
|
||||
else O.show_message(text("\red <B>[target] hit \himself with a bottle of [src.name] on the head!</B>"), 1)
|
||||
//Weaken the target for the duration that we calculated and divide it by 5.
|
||||
if(armor_duration)
|
||||
target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash!
|
||||
@@ -94,7 +94,7 @@
|
||||
//Default attack message and don't weaken the target.
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(target != user) O.show_message(text("\red <B>[target] has been attacked with a bottle of [src.name], by [user]!</B>"), 1)
|
||||
else O.show_message(text("\red <B>[target] has attacked himself with a bottle of [src.name]!</B>"), 1)
|
||||
else O.show_message(text("\red <B>[target] has attacked \himself with a bottle of [src.name]!</B>"), 1)
|
||||
|
||||
//Attack logs
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [target.name] ([target.ckey]) with a bottle!</font>")
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
if (moving_status == SHUTTLE_IDLE)
|
||||
return //someone cancelled the launch
|
||||
|
||||
arrive_time = world.time + travel_time*10
|
||||
moving_status = SHUTTLE_INTRANSIT
|
||||
move(departing, interim, direction)
|
||||
|
||||
arrive_time = world.time + travel_time*10
|
||||
|
||||
while (world.time < arrive_time)
|
||||
sleep(5)
|
||||
|
||||
|
||||
@@ -16,12 +16,15 @@
|
||||
else
|
||||
travel_time = SHUTTLE_TRANSIT_DURATION
|
||||
|
||||
//update move_time so we get correct ETAs
|
||||
//update move_time and launch_time so we get correct ETAs
|
||||
move_time = travel_time
|
||||
emergency_shuttle.launch_time = world.time
|
||||
|
||||
..()
|
||||
|
||||
/datum/shuttle/ferry/emergency/move(var/area/origin,var/area/destination)
|
||||
..(origin, destination)
|
||||
|
||||
if (origin == area_station) //leaving the station
|
||||
emergency_shuttle.departed = 1
|
||||
|
||||
@@ -30,8 +33,6 @@
|
||||
else
|
||||
priority_announcement.Announce("The Crew Transfer Shuttle has left the station. Estimate [round(emergency_shuttle.estimate_arrival_time()/60,1)] minutes until the shuttle docks at Central Command.")
|
||||
|
||||
..(origin, destination)
|
||||
|
||||
/datum/shuttle/ferry/emergency/can_launch(var/user)
|
||||
if (istype(user, /obj/machinery/computer/shuttle_control/emergency))
|
||||
var/obj/machinery/computer/shuttle_control/emergency/C = user
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] cuts through [target]'s flesh with \the [tool].", \
|
||||
"\blue You cut through [target]'s flesh with \the [tool], exposing the cores.")
|
||||
"\blue You cut through [target]'s flesh with \the [tool], revealing its silky innards.")
|
||||
target.brain_op_stage = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/slime/target, target_zone, obj/item/tool)
|
||||
|
||||
6827
maps/tgstation2.dmm
6827
maps/tgstation2.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user