Skip to content

Commit

Permalink
The Cooking Continuation (ParadiseSS13#26306)
Browse files Browse the repository at this point in the history
  • Loading branch information
AffectedArc07 authored Jul 30, 2024
1 parent 381124e commit 163a325
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 73 deletions.
7 changes: 2 additions & 5 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
// Variables for bloom and exposure
var/glow_icon = 'icons/obj/lamps.dmi'
var/exposure_icon = 'icons/effects/exposures.dmi'

var/glow_icon_state
var/glow_colored = TRUE
var/exposure_icon_state
var/exposure_colored = TRUE

var/image/glow_overlay
var/image/exposure_overlay
/// The alternate appearances we own. Lazylist
Expand Down Expand Up @@ -304,9 +304,6 @@
/atom/proc/return_analyzable_air()
return null

/atom/proc/check_eye(mob/user)
return

/atom/proc/on_reagent_change()
return

Expand Down
1 change: 0 additions & 1 deletion code/game/dna/dna_modifier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@
..()
if(A == occupant)
occupant = null
updateUsrDialog()
update_icon(UPDATE_ICON_STATE)
SStgui.update_uis(src)

Expand Down
2 changes: 0 additions & 2 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,10 @@
..()
if(A == occupant)
occupant = null
updateUsrDialog()
update_icon(UPDATE_ICON_STATE)
SStgui.update_uis(src)
if(A == beaker)
beaker = null
updateUsrDialog()
SStgui.update_uis(src)

/obj/machinery/sleeper/emp_act(severity)
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/adv_med.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
..()
if(A == occupant)
occupant = null
updateUsrDialog()
update_icon(UPDATE_ICON_STATE)

/obj/machinery/bodyscanner/narsie_act()
Expand Down
18 changes: 10 additions & 8 deletions code/game/machinery/computer/camera_advanced.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,24 @@
user.remote_control = null

current_user = null
user.unset_machine()
remove_eye(user)
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)

/obj/machinery/computer/camera_advanced/check_eye(mob/user)
if((stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || !user.has_vision() || user.incapacitated())
user.unset_machine()
/obj/machinery/computer/camera_advanced/process()
if(!current_user)
return

if((stat & (NOPOWER|BROKEN)) || (!Adjacent(current_user) && !current_user.has_unlimited_silicon_privilege) || !current_user.has_vision() || current_user.incapacitated())
remove_eye(current_user)

/obj/machinery/computer/camera_advanced/Destroy()
if(current_user)
current_user.unset_machine()
remove_eye(current_user)
QDEL_NULL(eyeobj)
QDEL_LIST_CONTENTS(actions)
return ..()

/obj/machinery/computer/camera_advanced/on_unset_machine(mob/M)
/obj/machinery/computer/camera_advanced/proc/remove_eye(mob/M)
if(M == current_user)
remove_eye_control(M)

Expand All @@ -65,7 +68,6 @@
return
if(..())
return
user.set_machine(src)

if(!eyeobj)
CreateEye()
Expand All @@ -85,7 +87,7 @@
else
// An abberant case - silent failure is obnoxious
to_chat(user, "<span class='warning'>ERROR: No linked and active camera network found.</span>")
user.unset_machine()
remove_eye(user)
else
give_eye_control(user)
eyeobj.setLoc(eyeobj.loc)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/guestpass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
if(user.drop_item())
I.forceMove(src)
scan = I
updateUsrDialog()
SStgui.update_uis(src)
else
to_chat(user, "<span class='warning'>There is already ID card inside.</span>")
return
Expand Down
7 changes: 0 additions & 7 deletions code/game/machinery/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,6 @@

return ..()

/obj/machinery/CouldUseTopic(mob/user)
..()
user.set_machine(src)

/obj/machinery/CouldNotUseTopic(mob/user)
usr.unset_machine()

/obj/machinery/proc/dropContents()//putting for swarmers, occupent code commented out, someone can use later.
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
..()
if(A == occupant)
occupant = null
updateUsrDialog()
update_icon(UPDATE_ICON_STATE)

/obj/machinery/recharge_station/narsie_act()
Expand Down
24 changes: 2 additions & 22 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,12 @@
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
if(ui_status(usr, state, href_list) == UI_INTERACTIVE)
CouldUseTopic(usr)
var/atom/host = ui_host()
host.add_fingerprint(usr)
return FALSE

CouldNotUseTopic(usr)
return TRUE

/obj/proc/CouldUseTopic(mob/user)
var/atom/host = ui_host()
host.add_fingerprint(user)

/obj/proc/CouldNotUseTopic(mob/user)
return

/obj/Destroy()
if(!ismachinery(src))
if(!speed_process)
Expand All @@ -89,15 +82,6 @@
STOP_PROCESSING(SSfastprocess, src)
return ..()

//user: The mob that is suiciding
//damagetype: The type of damage the item will inflict on the user
//BRUTELOSS = 1
//FIRELOSS = 2
//TOXLOSS = 4
//OXYLOSS = 8
//SHAME = 16
//OBLITERATION = 32

//Output a creative message and then return the damagetype done
/obj/proc/suicide_act(mob/user)
return FALSE
Expand Down Expand Up @@ -164,12 +148,8 @@
/mob/proc/unset_machine()
if(machine)
UnregisterSignal(machine, COMSIG_PARENT_QDELETING)
machine.on_unset_machine(src)
machine = null

//called when the user unsets the machine.
/atom/movable/proc/on_unset_machine(mob/user)
return

/mob/proc/set_machine(obj/O)
if(src.machine)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
..()
if(A == beaker)
beaker = null
updateUsrDialog()
SStgui.update_uis(src)
if(A == occupant)
occupant = null
updateUsrDialog()
SStgui.update_uis(src)
update_icon()

/obj/machinery/atmospherics/unary/cryo_cell/on_deconstruction()
Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/living/living_life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@
if(forced_look)
setDir()

if(machine)
machine.check_eye(src)

if(stat != DEAD)
return TRUE

Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/silicon/ai/ai_life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
if(!eyeobj || QDELETED(eyeobj) || !eyeobj.loc)
view_core()

if(machine)
machine.check_eye(src)
// Do holopad AI checks
if(istype(machine, /obj/machinery/hologram))
check_holopad_eye()

if(malfhack && malfhack.aidisabled)
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
Expand Down
11 changes: 1 addition & 10 deletions code/modules/mob/living/silicon/ai/ai_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(

ai_announcement()

/mob/living/silicon/ai/check_eye(mob/user)
/mob/living/silicon/ai/proc/check_holopad_eye(mob/user)
if(!current)
return null
user.reset_perspective(current)
Expand Down Expand Up @@ -1333,15 +1333,6 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
/mob/living/silicon/ai/can_buckle()
return FALSE

/mob/living/silicon/ai/switch_to_camera(obj/machinery/camera/C)
if(!C.can_use() || !is_in_chassis())
return FALSE

eyeobj.setLoc(get_turf(C))
client.eye = eyeobj
return TRUE


/mob/living/silicon/ai/proc/can_see(atom/A)
if(isturf(loc)) //AI in core, check if on cameras
//get_turf_pixel() is because APCs in maint aren't actually in view of the inner camera
Expand Down
6 changes: 0 additions & 6 deletions code/modules/mob/mob_misc_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,6 @@
return FALSE
return TRUE

/mob/proc/switch_to_camera(obj/machinery/camera/C)
if(!C.can_use() || incapacitated() || (get_dist(C, src) > 1 || machine != src || !has_vision()))
return FALSE
check_eye(src)
return TRUE

/mob/proc/rename_character(oldname, newname)
if(!newname)
return FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)

if(dist < 2)
show_content(user, forceshow = 1)
else
show_content(user, forcestars = 1)
return

/obj/item/paper/attack(mob/living/carbon/M, mob/living/carbon/user, def_zone)
if(!ishuman(M))
Expand Down
1 change: 0 additions & 1 deletion code/modules/reagents/chemistry/machinery/pandemic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@
beaker = I
beaker.loc = src
to_chat(user, "<span class='notice'>You add the beaker to the machine.</span>")
updateUsrDialog()
SStgui.update_uis(src, TRUE)
icon_state = "pandemic1"
else
Expand Down

0 comments on commit 163a325

Please sign in to comment.